OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef EXTENSIONS_BROWSER_API_NETWORKING_CONFIG_NETWORKING_CONFIG_SERVICE_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_NETWORKING_CONFIG_NETWORKING_CONFIG_SERVICE_H_ |
6 #define EXTENSIONS_BROWSER_API_NETWORKING_CONFIG_NETWORKING_CONFIG_SERVICE_H_ | 6 #define EXTENSIONS_BROWSER_API_NETWORKING_CONFIG_NETWORKING_CONFIG_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 // Note: |extension_registry| must outlive this class. | 55 // Note: |extension_registry| must outlive this class. |
56 NetworkingConfigService(content::BrowserContext* browser_context, | 56 NetworkingConfigService(content::BrowserContext* browser_context, |
57 std::unique_ptr<EventDelegate> event_delegate, | 57 std::unique_ptr<EventDelegate> event_delegate, |
58 ExtensionRegistry* extension_registry); | 58 ExtensionRegistry* extension_registry); |
59 ~NetworkingConfigService() override; | 59 ~NetworkingConfigService() override; |
60 | 60 |
61 // ExtensionRegistryObserver | 61 // ExtensionRegistryObserver |
62 void OnExtensionUnloaded(content::BrowserContext* browser_context, | 62 void OnExtensionUnloaded(content::BrowserContext* browser_context, |
63 const Extension* extension, | 63 const Extension* extension, |
64 UnloadedExtensionInfo::Reason reason) override; | 64 UnloadedExtensionReason reason) override; |
65 | 65 |
66 // Returns the extension id registered for |hex_ssid|. If no extension is | 66 // Returns the extension id registered for |hex_ssid|. If no extension is |
67 // registered for this |hex_ssid|, the function returns an empty string. | 67 // registered for this |hex_ssid|, the function returns an empty string. |
68 // |hex_ssid|: SSID in hex encoding. | 68 // |hex_ssid|: SSID in hex encoding. |
69 std::string LookupExtensionIdForHexSsid(std::string hex_ssid) const; | 69 std::string LookupExtensionIdForHexSsid(std::string hex_ssid) const; |
70 | 70 |
71 // Returns true if the extension with id |extension_id| registered for | 71 // Returns true if the extension with id |extension_id| registered for |
72 // |onCaptivePortalDetected| events, otherwise false. | 72 // |onCaptivePortalDetected| events, otherwise false. |
73 bool IsRegisteredForCaptivePortalEvent(const std::string& extension_id) const; | 73 bool IsRegisteredForCaptivePortalEvent(const std::string& extension_id) const; |
74 | 74 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 // This map associates a given hex encoded SSID to an extension entry. | 140 // This map associates a given hex encoded SSID to an extension entry. |
141 std::map<std::string, std::string> hex_ssid_to_extension_id_; | 141 std::map<std::string, std::string> hex_ssid_to_extension_id_; |
142 | 142 |
143 base::WeakPtrFactory<NetworkingConfigService> weak_factory_; | 143 base::WeakPtrFactory<NetworkingConfigService> weak_factory_; |
144 }; | 144 }; |
145 | 145 |
146 } // namespace extensions | 146 } // namespace extensions |
147 | 147 |
148 #endif // EXTENSIONS_BROWSER_API_NETWORKING_CONFIG_NETWORKING_CONFIG_SERVICE_H_ | 148 #endif // EXTENSIONS_BROWSER_API_NETWORKING_CONFIG_NETWORKING_CONFIG_SERVICE_H_ |
OLD | NEW |