1// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "net/base/net_errors.h"
6
7#include "base/basictypes.h"
8#include "base/stringize_macros.h"
9
10namespace net {
11
12const char kErrorDomain[] = "net";
13
14const char* ErrorToString(int error) {
15  if (error == 0)
16    return "net::OK";
17
18  switch (error) {
19#define NET_ERROR(label, value) \
20  case ERR_ ## label: \
21    return "net::" STRINGIZE_NO_EXPANSION(ERR_ ## label);
22#include "net/base/net_error_list.h"
23#undef NET_ERROR
24  default:
25    return "net::<unknown>";
26  }
27}
28
29}  // namespace net
30