summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_config_source.cc
blob: 6dd6071a653a211e87e783a31f04be2da06b0db3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/proxy/proxy_config_source.h"

#include "base/logging.h"

namespace net {

namespace {

const char* const kSourceNames[] = {
  "UNKNOWN",
  "SYSTEM",
  "SYSTEM FAILED",
  "GCONF",
  "GSETTINGS",
  "KDE",
  "ENV",
  "CUSTOM",
  "TEST"
};
static_assert(arraysize(kSourceNames) == NUM_PROXY_CONFIG_SOURCES,
              "kSourceNames has incorrect size");

}  // namespace

const char* ProxyConfigSourceToString(ProxyConfigSource source) {
  DCHECK_GT(NUM_PROXY_CONFIG_SOURCES, source);
  return kSourceNames[source];
}

}  // namespace net