| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Implementation of the Chrome Extensions Proxy Settings API. | 5 // Implementation of the Chrome Extensions Proxy Settings API. |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/proxy/proxy_api.h" | 7 #include "chrome/browser/extensions/api/proxy/proxy_api.h" |
| 8 | 8 |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/browser/extensions/api/proxy/proxy_api_constants.h" | 13 #include "chrome/browser/extensions/api/proxy/proxy_api_constants.h" |
| 14 #include "chrome/browser/extensions/api/proxy/proxy_api_helpers.h" | 14 #include "chrome/browser/extensions/api/proxy/proxy_api_helpers.h" |
| 15 #include "chrome/browser/extensions/event_router_forwarder.h" | 15 #include "chrome/browser/extensions/event_router_forwarder.h" |
| 16 #include "chrome/browser/extensions/extension_service.h" | 16 #include "chrome/browser/extensions/extension_service.h" |
| 17 #include "components/proxy_config/proxy_config_dictionary.h" | 17 #include "components/proxy_config/proxy_config_dictionary.h" |
| 18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
| 19 | 19 |
| 20 namespace extensions { | 20 namespace extensions { |
| 21 | 21 |
| 22 namespace helpers = proxy_api_helpers; | 22 namespace helpers = proxy_api_helpers; |
| 23 namespace keys = proxy_api_constants; | 23 namespace keys = proxy_api_constants; |
| 24 | 24 |
| 25 // static | 25 // static |
| 26 ProxyEventRouter* ProxyEventRouter::GetInstance() { | 26 ProxyEventRouter* ProxyEventRouter::GetInstance() { |
| 27 return Singleton<ProxyEventRouter>::get(); | 27 return base::Singleton<ProxyEventRouter>::get(); |
| 28 } | 28 } |
| 29 | 29 |
| 30 ProxyEventRouter::ProxyEventRouter() { | 30 ProxyEventRouter::ProxyEventRouter() { |
| 31 } | 31 } |
| 32 | 32 |
| 33 ProxyEventRouter::~ProxyEventRouter() { | 33 ProxyEventRouter::~ProxyEventRouter() { |
| 34 } | 34 } |
| 35 | 35 |
| 36 void ProxyEventRouter::OnProxyError( | 36 void ProxyEventRouter::OnProxyError( |
| 37 EventRouterForwarder* event_router, | 37 EventRouterForwarder* event_router, |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 extension_pref->Set(keys::kProxyConfigRules, proxy_rules_dict); | 181 extension_pref->Set(keys::kProxyConfigRules, proxy_rules_dict); |
| 182 break; | 182 break; |
| 183 } | 183 } |
| 184 case ProxyPrefs::kModeCount: | 184 case ProxyPrefs::kModeCount: |
| 185 NOTREACHED(); | 185 NOTREACHED(); |
| 186 } | 186 } |
| 187 return extension_pref.release(); | 187 return extension_pref.release(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 } // namespace extensions | 190 } // namespace extensions |
| OLD | NEW |