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

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

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Enum class Created 3 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 #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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 NOTREACHED(); 546 NOTREACHED();
547 return; 547 return;
548 } 548 }
549 549
550 DestroyConfigurationsForExtension(extension); 550 DestroyConfigurationsForExtension(extension);
551 } 551 }
552 552
553 void VpnService::OnExtensionUnloaded( 553 void VpnService::OnExtensionUnloaded(
554 content::BrowserContext* browser_context, 554 content::BrowserContext* browser_context,
555 const extensions::Extension* extension, 555 const extensions::Extension* extension,
556 extensions::UnloadedExtensionInfo::Reason reason) { 556 extensions::UnloadedExtensionReason reason) {
557 if (browser_context != browser_context_) { 557 if (browser_context != browser_context_) {
558 NOTREACHED(); 558 NOTREACHED();
559 return; 559 return;
560 } 560 }
561 561
562 if (active_configuration_ && 562 if (active_configuration_ &&
563 active_configuration_->extension_id() == extension->id()) { 563 active_configuration_->extension_id() == extension->id()) {
564 shill_client_->UpdateConnectionState( 564 shill_client_->UpdateConnectionState(
565 active_configuration_->object_path(), 565 active_configuration_->object_path(),
566 static_cast<uint32_t>(api_vpn::VPN_CONNECTION_STATE_FAILURE), 566 static_cast<uint32_t>(api_vpn::VPN_CONNECTION_STATE_FAILURE),
567 base::Bind(base::DoNothing), base::Bind(DoNothingFailureCallback)); 567 base::Bind(base::DoNothing), base::Bind(DoNothingFailureCallback));
568 } 568 }
569 if (reason == extensions::UnloadedExtensionInfo::REASON_DISABLE || 569 if (reason == extensions::UnloadedExtensionReason::REASON_DISABLE ||
570 reason == extensions::UnloadedExtensionInfo::REASON_BLACKLIST) { 570 reason == extensions::UnloadedExtensionReason::REASON_BLACKLIST) {
571 DestroyConfigurationsForExtension(extension); 571 DestroyConfigurationsForExtension(extension);
572 } 572 }
573 } 573 }
574 574
575 void VpnService::OnCreateConfigurationSuccess( 575 void VpnService::OnCreateConfigurationSuccess(
576 const VpnService::SuccessCallback& callback, 576 const VpnService::SuccessCallback& callback,
577 VpnConfiguration* configuration, 577 VpnConfiguration* configuration,
578 const std::string& service_path, 578 const std::string& service_path,
579 const std::string& guid) { 579 const std::string& guid) {
580 configuration->set_service_path(service_path); 580 configuration->set_service_path(service_path);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 configuration->set_pepper_proxy(std::move(pepper_vpn_provider_proxy)); 693 configuration->set_pepper_proxy(std::move(pepper_vpn_provider_proxy));
694 694
695 success.Run(); 695 success.Run();
696 } 696 }
697 697
698 std::unique_ptr<content::VpnServiceProxy> VpnService::GetVpnServiceProxy() { 698 std::unique_ptr<content::VpnServiceProxy> VpnService::GetVpnServiceProxy() {
699 return base::WrapUnique(new VpnServiceProxyImpl(weak_factory_.GetWeakPtr())); 699 return base::WrapUnique(new VpnServiceProxyImpl(weak_factory_.GetWeakPtr()));
700 } 700 }
701 701
702 } // namespace chromeos 702 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698