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

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

Issue 1779633002: Invoke createNetwork() callback with GUID, not service name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more trybot failures 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 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 #include "extensions/browser/api/vpn_provider/vpn_service.h" 5 #include "extensions/browser/api/vpn_provider/vpn_service.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 } 487 }
488 if (reason == extensions::UnloadedExtensionInfo::REASON_DISABLE || 488 if (reason == extensions::UnloadedExtensionInfo::REASON_DISABLE ||
489 reason == extensions::UnloadedExtensionInfo::REASON_BLACKLIST) { 489 reason == extensions::UnloadedExtensionInfo::REASON_BLACKLIST) {
490 DestroyConfigurationsForExtension(extension); 490 DestroyConfigurationsForExtension(extension);
491 } 491 }
492 } 492 }
493 493
494 void VpnService::OnCreateConfigurationSuccess( 494 void VpnService::OnCreateConfigurationSuccess(
495 const VpnService::SuccessCallback& callback, 495 const VpnService::SuccessCallback& callback,
496 VpnConfiguration* configuration, 496 VpnConfiguration* configuration,
497 const std::string& service_path) { 497 const std::string& service_path,
498 const std::string& guid) {
498 configuration->set_service_path(service_path); 499 configuration->set_service_path(service_path);
499 service_path_to_configuration_map_[service_path] = configuration; 500 service_path_to_configuration_map_[service_path] = configuration;
500 shill_client_->AddShillThirdPartyVpnObserver(configuration->object_path(), 501 shill_client_->AddShillThirdPartyVpnObserver(configuration->object_path(),
501 configuration); 502 configuration);
502 callback.Run(); 503 callback.Run();
503 } 504 }
504 505
505 void VpnService::OnCreateConfigurationFailure( 506 void VpnService::OnCreateConfigurationFailure(
506 const VpnService::FailureCallback& callback, 507 const VpnService::FailureCallback& callback,
507 VpnConfiguration* configuration, 508 VpnConfiguration* configuration,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 delete configuration; 564 delete configuration;
564 } 565 }
565 566
566 bool VpnService::DoesActiveConfigurationExistAndIsAccessAuthorized( 567 bool VpnService::DoesActiveConfigurationExistAndIsAccessAuthorized(
567 const std::string& extension_id) { 568 const std::string& extension_id) {
568 return active_configuration_ && 569 return active_configuration_ &&
569 active_configuration_->extension_id() == extension_id; 570 active_configuration_->extension_id() == extension_id;
570 } 571 }
571 572
572 } // namespace chromeos 573 } // namespace chromeos
OLDNEW
« no previous file with comments | « extensions/browser/api/vpn_provider/vpn_service.h ('k') | ui/chromeos/network/network_connect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698