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

Side by Side Diff: chrome/browser/ui/ash/vpn_list_forwarder.cc

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase 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
« no previous file with comments | « chrome/browser/ui/ash/vpn_list_forwarder.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/ui/ash/vpn_list_forwarder.h" 5 #include "chrome/browser/ui/ash/vpn_list_forwarder.h"
6 6
7 #include "ash/public/interfaces/constants.mojom.h" 7 #include "ash/public/interfaces/constants.mojom.h"
8 #include "ash/public/interfaces/vpn_list.mojom.h" 8 #include "ash/public/interfaces/vpn_list.mojom.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void VpnListForwarder::OnExtensionLoaded( 73 void VpnListForwarder::OnExtensionLoaded(
74 content::BrowserContext* browser_context, 74 content::BrowserContext* browser_context,
75 const extensions::Extension* extension) { 75 const extensions::Extension* extension) {
76 if (IsVPNProvider(extension)) 76 if (IsVPNProvider(extension))
77 UpdateVPNProviders(); 77 UpdateVPNProviders();
78 } 78 }
79 79
80 void VpnListForwarder::OnExtensionUnloaded( 80 void VpnListForwarder::OnExtensionUnloaded(
81 content::BrowserContext* browser_context, 81 content::BrowserContext* browser_context,
82 const extensions::Extension* extension, 82 const extensions::Extension* extension,
83 extensions::UnloadedExtensionInfo::Reason reason) { 83 extensions::UnloadedExtensionReason reason) {
84 if (IsVPNProvider(extension)) 84 if (IsVPNProvider(extension))
85 UpdateVPNProviders(); 85 UpdateVPNProviders();
86 } 86 }
87 87
88 void VpnListForwarder::OnShutdown(extensions::ExtensionRegistry* registry) { 88 void VpnListForwarder::OnShutdown(extensions::ExtensionRegistry* registry) {
89 DCHECK(extension_registry_); 89 DCHECK(extension_registry_);
90 extension_registry_->RemoveObserver(this); 90 extension_registry_->RemoveObserver(this);
91 extension_registry_ = nullptr; 91 extension_registry_ = nullptr;
92 } 92 }
93 93
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 void VpnListForwarder::AttachToPrimaryUserExtensionRegistry() { 146 void VpnListForwarder::AttachToPrimaryUserExtensionRegistry() {
147 DCHECK(!extension_registry_); 147 DCHECK(!extension_registry_);
148 extension_registry_ = 148 extension_registry_ =
149 extensions::ExtensionRegistry::Get(GetProfileForPrimaryUser()); 149 extensions::ExtensionRegistry::Get(GetProfileForPrimaryUser());
150 extension_registry_->AddObserver(this); 150 extension_registry_->AddObserver(this);
151 151
152 UpdateVPNProviders(); 152 UpdateVPNProviders();
153 } 153 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/vpn_list_forwarder.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698