OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "extensions/browser/api/networking_private/networking_private_api.h" | 5 #include "extensions/browser/api/networking_private/networking_private_api.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "components/onc/onc_constants.h" | 10 #include "components/onc/onc_constants.h" |
11 #include "extensions/browser/api/networking_private/networking_private_delegate.
h" | 11 #include "extensions/browser/api/networking_private/networking_private_delegate.
h" |
12 #include "extensions/browser/api/networking_private/networking_private_delegate_
factory.h" | 12 #include "extensions/browser/api/networking_private/networking_private_delegate_
factory.h" |
13 #include "extensions/browser/extension_function_registry.h" | 13 #include "extensions/browser/extension_function_registry.h" |
14 #include "extensions/common/api/networking_private.h" | 14 #include "extensions/common/api/networking_private.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 const int kDefaultNetworkListLimit = 1000; | 18 const int kDefaultNetworkListLimit = 1000; |
19 | 19 |
20 extensions::NetworkingPrivateDelegate* GetDelegate( | 20 extensions::NetworkingPrivateDelegate* GetDelegate( |
21 content::BrowserContext* browser_context) { | 21 content::BrowserContext* browser_context) { |
22 return extensions::NetworkingPrivateDelegateFactory::GetForBrowserContext( | 22 return extensions::NetworkingPrivateDelegateFactory::GetForBrowserContext( |
23 browser_context); | 23 browser_context); |
24 } | 24 } |
25 | 25 |
26 } // namespace | 26 } // namespace |
27 | 27 |
28 namespace extensions { | 28 namespace extensions { |
29 | 29 |
30 namespace private_api = core_api::networking_private; | 30 namespace private_api = api::networking_private; |
31 | 31 |
32 namespace networking_private { | 32 namespace networking_private { |
33 | 33 |
34 // static | 34 // static |
35 const char kErrorInvalidNetworkGuid[] = "Error.InvalidNetworkGuid"; | 35 const char kErrorInvalidNetworkGuid[] = "Error.InvalidNetworkGuid"; |
36 const char kErrorNetworkUnavailable[] = "Error.NetworkUnavailable"; | 36 const char kErrorNetworkUnavailable[] = "Error.NetworkUnavailable"; |
37 const char kErrorEncryptionError[] = "Error.EncryptionError"; | 37 const char kErrorEncryptionError[] = "Error.EncryptionError"; |
38 const char kErrorNotReady[] = "Error.NotReady"; | 38 const char kErrorNotReady[] = "Error.NotReady"; |
39 const char kErrorNotSupported[] = "Error.NotSupported"; | 39 const char kErrorNotSupported[] = "Error.NotSupported"; |
40 | 40 |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 SendResponse(true); | 698 SendResponse(true); |
699 } | 699 } |
700 | 700 |
701 void NetworkingPrivateGetCaptivePortalStatusFunction::Failure( | 701 void NetworkingPrivateGetCaptivePortalStatusFunction::Failure( |
702 const std::string& error) { | 702 const std::string& error) { |
703 error_ = error; | 703 error_ = error; |
704 SendResponse(false); | 704 SendResponse(false); |
705 } | 705 } |
706 | 706 |
707 } // namespace extensions | 707 } // namespace extensions |
OLD | NEW |