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

Side by Side Diff: extensions/browser/api/networking_private/networking_private_api.h

Issue 1779633002: Invoke createNetwork() callback with GUID, not service name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pass both service_path and guid arguments to all callbacks Created 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PRIVATE_NETWORKING_PRIVATE_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_
6 #define EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_ 6 #define EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 DECLARE_EXTENSION_FUNCTION("networkingPrivate.createNetwork", 114 DECLARE_EXTENSION_FUNCTION("networkingPrivate.createNetwork",
115 NETWORKINGPRIVATE_CREATENETWORK); 115 NETWORKINGPRIVATE_CREATENETWORK);
116 116
117 protected: 117 protected:
118 ~NetworkingPrivateCreateNetworkFunction() override; 118 ~NetworkingPrivateCreateNetworkFunction() override;
119 119
120 // AsyncExtensionFunction overrides. 120 // AsyncExtensionFunction overrides.
121 bool RunAsync() override; 121 bool RunAsync() override;
122 122
123 private: 123 private:
124 void Success(const std::string& guid); 124 void Success(const std::string& service_path, const std::string& guid);
125 void Failure(const std::string& error); 125 void Failure(const std::string& error);
126 126
127 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCreateNetworkFunction); 127 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCreateNetworkFunction);
128 }; 128 };
129 129
130 // Implements the chrome.networkingPrivate.createNetwork method. 130 // Implements the chrome.networkingPrivate.createNetwork method.
131 class NetworkingPrivateForgetNetworkFunction : public AsyncExtensionFunction { 131 class NetworkingPrivateForgetNetworkFunction : public AsyncExtensionFunction {
132 public: 132 public:
133 NetworkingPrivateForgetNetworkFunction() {} 133 NetworkingPrivateForgetNetworkFunction() {}
134 DECLARE_EXTENSION_FUNCTION("networkingPrivate.forgetNetwork", 134 DECLARE_EXTENSION_FUNCTION("networkingPrivate.forgetNetwork",
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 private: 499 private:
500 void Success(); 500 void Success();
501 void Failure(const std::string& error); 501 void Failure(const std::string& error);
502 502
503 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateSetCellularSimStateFunction); 503 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateSetCellularSimStateFunction);
504 }; 504 };
505 505
506 } // namespace extensions 506 } // namespace extensions
507 507
508 #endif // EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_ 508 #endif // EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698