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

Side by Side Diff: extensions/browser/api/networking_private/networking_private_service_client.cc

Issue 2754903002: Prevent networkingPrivate.forgetNetwork from removing shared configs (Closed)
Patch Set: . Created 3 years, 8 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
« no previous file with comments | « extensions/browser/api/networking_private/networking_private_service_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "extensions/browser/api/networking_private/networking_private_service_c lient.h" 5 #include "extensions/browser/api/networking_private/networking_private_service_c lient.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 FROM_HERE, base::Bind(&WiFiService::CreateNetwork, 220 FROM_HERE, base::Bind(&WiFiService::CreateNetwork,
221 base::Unretained(wifi_service_.get()), shared, 221 base::Unretained(wifi_service_.get()), shared,
222 base::Passed(&properties), network_guid, error), 222 base::Passed(&properties), network_guid, error),
223 base::Bind(&NetworkingPrivateServiceClient::AfterCreateNetwork, 223 base::Bind(&NetworkingPrivateServiceClient::AfterCreateNetwork,
224 weak_factory_.GetWeakPtr(), service_callbacks->id, 224 weak_factory_.GetWeakPtr(), service_callbacks->id,
225 base::Owned(network_guid), base::Owned(error))); 225 base::Owned(network_guid), base::Owned(error)));
226 } 226 }
227 227
228 void NetworkingPrivateServiceClient::ForgetNetwork( 228 void NetworkingPrivateServiceClient::ForgetNetwork(
229 const std::string& guid, 229 const std::string& guid,
230 bool allow_forget_shared_config,
230 const VoidCallback& success_callback, 231 const VoidCallback& success_callback,
231 const FailureCallback& failure_callback) { 232 const FailureCallback& failure_callback) {
232 // TODO(mef): Implement for Win/Mac 233 // TODO(mef): Implement for Win/Mac
233 failure_callback.Run(networking_private::kErrorNotSupported); 234 failure_callback.Run(networking_private::kErrorNotSupported);
234 } 235 }
235 236
236 void NetworkingPrivateServiceClient::GetNetworks( 237 void NetworkingPrivateServiceClient::GetNetworks(
237 const std::string& network_type, 238 const std::string& network_type,
238 bool configured_only, 239 bool configured_only,
239 bool visible_only, 240 bool visible_only,
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 } 474 }
474 475
475 void NetworkingPrivateServiceClient::OnNetworkListChangedEventOnUIThread( 476 void NetworkingPrivateServiceClient::OnNetworkListChangedEventOnUIThread(
476 const std::vector<std::string>& network_guids) { 477 const std::vector<std::string>& network_guids) {
477 DCHECK_CURRENTLY_ON(BrowserThread::UI); 478 DCHECK_CURRENTLY_ON(BrowserThread::UI);
478 for (auto& observer : network_events_observers_) 479 for (auto& observer : network_events_observers_)
479 observer.OnNetworkListChangedEvent(network_guids); 480 observer.OnNetworkListChangedEvent(network_guids);
480 } 481 }
481 482
482 } // namespace extensions 483 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/networking_private/networking_private_service_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698