Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(798)

Side by Side Diff: extensions/browser/api/networking_config/networking_config_service.cc

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "extensions/browser/api/networking_config/networking_config_service.h" 5 #include "extensions/browser/api/networking_config/networking_config_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 weak_factory_(this) { 61 weak_factory_(this) {
62 registry_observer_.Add(extension_registry); 62 registry_observer_.Add(extension_registry);
63 } 63 }
64 64
65 NetworkingConfigService::~NetworkingConfigService() { 65 NetworkingConfigService::~NetworkingConfigService() {
66 } 66 }
67 67
68 void NetworkingConfigService::OnExtensionUnloaded( 68 void NetworkingConfigService::OnExtensionUnloaded(
69 content::BrowserContext* browser_context, 69 content::BrowserContext* browser_context,
70 const Extension* extension, 70 const Extension* extension,
71 UnloadedExtensionInfo::Reason reason) { 71 UnloadedExtensionReason reason) {
72 UnregisterExtension(extension->id()); 72 UnregisterExtension(extension->id());
73 } 73 }
74 74
75 std::string NetworkingConfigService::LookupExtensionIdForHexSsid( 75 std::string NetworkingConfigService::LookupExtensionIdForHexSsid(
76 std::string hex_ssid) const { 76 std::string hex_ssid) const {
77 // Transform hex_ssid to uppercase. 77 // Transform hex_ssid to uppercase.
78 transform(hex_ssid.begin(), hex_ssid.end(), hex_ssid.begin(), toupper); 78 transform(hex_ssid.begin(), hex_ssid.end(), hex_ssid.begin(), toupper);
79 79
80 const auto it = hex_ssid_to_extension_id_.find(hex_ssid); 80 const auto it = hex_ssid_to_extension_id_.find(hex_ssid);
81 if (it == hex_ssid_to_extension_id_.end()) 81 if (it == hex_ssid_to_extension_id_.end())
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 network_handler->managed_network_configuration_handler()->GetProperties( 228 network_handler->managed_network_configuration_handler()->GetProperties(
229 "" /* empty userhash */, service_path, 229 "" /* empty userhash */, service_path,
230 base::Bind(&NetworkingConfigService::OnGotProperties, 230 base::Bind(&NetworkingConfigService::OnGotProperties,
231 weak_factory_.GetWeakPtr(), extension_id, guid, 231 weak_factory_.GetWeakPtr(), extension_id, guid,
232 authentication_callback), 232 authentication_callback),
233 base::Bind(&NetworkingConfigService::OnGetPropertiesFailed, 233 base::Bind(&NetworkingConfigService::OnGetPropertiesFailed,
234 weak_factory_.GetWeakPtr(), extension_id, guid)); 234 weak_factory_.GetWeakPtr(), extension_id, guid));
235 } 235 }
236 236
237 } // namespace extensions 237 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/networking_config/networking_config_service.h ('k') | extensions/browser/api/power/power_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698