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

Side by Side Diff: extensions/browser/api/vpn_provider/vpn_service.h

Issue 1028213002: Destroy configurations created by VPN extension on disable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes comments from Philipp Created 5 years, 9 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 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 #ifndef EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_ 5 #ifndef EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_
6 #define EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_ 6 #define EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // |extension_id| is authorized to access it. 208 // |extension_id| is authorized to access it.
209 bool DoesActiveConfigurationExistAndIsAccessAuthorized( 209 bool DoesActiveConfigurationExistAndIsAccessAuthorized(
210 const std::string& extension_id); 210 const std::string& extension_id);
211 211
212 // Send an event with name |event_name| and arguments |event_args| to the 212 // Send an event with name |event_name| and arguments |event_args| to the
213 // extension with id |extension_id|. 213 // extension with id |extension_id|.
214 void SendSignalToExtension(const std::string& extension_id, 214 void SendSignalToExtension(const std::string& extension_id,
215 const std::string& event_name, 215 const std::string& event_name,
216 scoped_ptr<base::ListValue> event_args); 216 scoped_ptr<base::ListValue> event_args);
217 217
218 // Destroy configurations belonging to the extension.
219 void DestroyConfigurationsForExtension(
220 const extensions::Extension* extension);
221
218 // Set the active configuration. 222 // Set the active configuration.
219 void SetActiveConfiguration(VpnConfiguration* configuration); 223 void SetActiveConfiguration(VpnConfiguration* configuration);
220 224
221 content::BrowserContext* browser_context_; 225 content::BrowserContext* browser_context_;
222 std::string userid_hash_; 226 std::string userid_hash_;
223 227
224 extensions::ExtensionRegistry* extension_registry_; 228 extensions::ExtensionRegistry* extension_registry_;
225 extensions::EventRouter* event_router_; 229 extensions::EventRouter* event_router_;
226 ShillThirdPartyVpnDriverClient* shill_client_; 230 ShillThirdPartyVpnDriverClient* shill_client_;
227 NetworkConfigurationHandler* network_configuration_handler_; 231 NetworkConfigurationHandler* network_configuration_handler_;
228 NetworkProfileHandler* network_profile_handler_; 232 NetworkProfileHandler* network_profile_handler_;
229 NetworkStateHandler* network_state_handler_; 233 NetworkStateHandler* network_state_handler_;
230 234
231 VpnConfiguration* active_configuration_; 235 VpnConfiguration* active_configuration_;
232 236
233 // Key map owns the VpnConfigurations. 237 // Key map owns the VpnConfigurations.
234 StringToConfigurationMap key_to_configuration_map_; 238 StringToConfigurationMap key_to_configuration_map_;
235 239
236 // Service path does not own the VpnConfigurations. 240 // Service path does not own the VpnConfigurations.
237 StringToConfigurationMap service_path_to_configuration_map_; 241 StringToConfigurationMap service_path_to_configuration_map_;
238 242
239 base::WeakPtrFactory<VpnService> weak_factory_; 243 base::WeakPtrFactory<VpnService> weak_factory_;
240 244
241 DISALLOW_COPY_AND_ASSIGN(VpnService); 245 DISALLOW_COPY_AND_ASSIGN(VpnService);
242 }; 246 };
243 247
244 } // namespace chromeos 248 } // namespace chromeos
245 249
246 #endif // EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_ 250 #endif // EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/vpn_provider/vpn_provider_apitest.cc ('k') | extensions/browser/api/vpn_provider/vpn_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698