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

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

Issue 1922873005: ppapi: PPB_VpnProvider: Bind VpnService to the PPAPI Resource Host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vpn-api-resource-host
Patch Set: Add NOTREACHED() Created 4 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 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 <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 // Verifies if the extension has a configuration that is connected. 156 // Verifies if the extension has a configuration that is connected.
157 bool VerifyConfigIsConnectedForTesting(const std::string& extension_id); 157 bool VerifyConfigIsConnectedForTesting(const std::string& extension_id);
158 158
159 // Gets the unique key for the configuration |configuration_name| created by 159 // Gets the unique key for the configuration |configuration_name| created by
160 // the extension with id |extension_id|. 160 // the extension with id |extension_id|.
161 // This method is made public for testing. 161 // This method is made public for testing.
162 static std::string GetKey(const std::string& extension_id, 162 static std::string GetKey(const std::string& extension_id,
163 const std::string& configuration_name); 163 const std::string& configuration_name);
164 164
165 void Bind(const std::string& extension_id,
166 const std::string& configuration_id,
167 const std::string& configuration_name,
168 const SuccessCallback& success,
169 const FailureCallback& failure);
170
165 private: 171 private:
166 class VpnConfiguration; 172 class VpnConfiguration;
173 class VpnServiceDelegateImpl;
167 174
168 using StringToConfigurationMap = std::map<std::string, VpnConfiguration*>; 175 using StringToConfigurationMap = std::map<std::string, VpnConfiguration*>;
169 176
170 // Callback used to indicate that configuration was successfully created. 177 // Callback used to indicate that configuration was successfully created.
171 void OnCreateConfigurationSuccess(const SuccessCallback& callback, 178 void OnCreateConfigurationSuccess(const SuccessCallback& callback,
172 VpnConfiguration* configuration, 179 VpnConfiguration* configuration,
173 const std::string& service_path, 180 const std::string& service_path,
174 const std::string& guid); 181 const std::string& guid);
175 182
176 // Callback used to indicate that configuration creation failed. 183 // Callback used to indicate that configuration creation failed.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 StringToConfigurationMap service_path_to_configuration_map_; 252 StringToConfigurationMap service_path_to_configuration_map_;
246 253
247 base::WeakPtrFactory<VpnService> weak_factory_; 254 base::WeakPtrFactory<VpnService> weak_factory_;
248 255
249 DISALLOW_COPY_AND_ASSIGN(VpnService); 256 DISALLOW_COPY_AND_ASSIGN(VpnService);
250 }; 257 };
251 258
252 } // namespace chromeos 259 } // namespace chromeos
253 260
254 #endif // EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_ 261 #endif // EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/api/vpn_provider/vpn_service.cc » ('j') | extensions/browser/api/vpn_provider/vpn_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698