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

Side by Side Diff: chrome/browser/extensions/extension_system_impl.cc

Issue 595363002: Add policy controlled permission block list for extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ext-fix
Patch Set: fix memory leaks Created 6 years, 1 month 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 "chrome/browser/extensions/extension_system_impl.h" 5 #include "chrome/browser/extensions/extension_system_impl.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 if (user && policy::IsDeviceLocalAccountUser(user->email(), 130 if (user && policy::IsDeviceLocalAccountUser(user->email(),
131 &device_local_account_type)) { 131 &device_local_account_type)) {
132 device_local_account_management_policy_provider_.reset( 132 device_local_account_management_policy_provider_.reset(
133 new chromeos::DeviceLocalAccountManagementPolicyProvider( 133 new chromeos::DeviceLocalAccountManagementPolicyProvider(
134 device_local_account_type)); 134 device_local_account_type));
135 } 135 }
136 #endif // defined(OS_CHROMEOS) 136 #endif // defined(OS_CHROMEOS)
137 } 137 }
138 138
139 void ExtensionSystemImpl::Shared::RegisterManagementPolicyProviders() { 139 void ExtensionSystemImpl::Shared::RegisterManagementPolicyProviders() {
140 management_policy_->RegisterProvider( 140 management_policy_->RegisterProviders(
141 ExtensionManagementFactory::GetForBrowserContext(profile_) 141 ExtensionManagementFactory::GetForBrowserContext(profile_)
142 ->GetProvider()); 142 ->GetProviders());
143 143
144 #if defined(OS_CHROMEOS) 144 #if defined(OS_CHROMEOS)
145 if (device_local_account_management_policy_provider_) { 145 if (device_local_account_management_policy_provider_) {
146 management_policy_->RegisterProvider( 146 management_policy_->RegisterProvider(
147 device_local_account_management_policy_provider_.get()); 147 device_local_account_management_policy_provider_.get());
148 } 148 }
149 #endif // defined(OS_CHROMEOS) 149 #endif // defined(OS_CHROMEOS)
150 150
151 management_policy_->RegisterProvider(install_verifier_.get()); 151 management_policy_->RegisterProvider(install_verifier_.get());
152 } 152 }
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 640 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
641 const std::string& extension_id, 641 const std::string& extension_id,
642 const UnloadedExtensionInfo::Reason reason) { 642 const UnloadedExtensionInfo::Reason reason) {
643 BrowserThread::PostTask( 643 BrowserThread::PostTask(
644 BrowserThread::IO, 644 BrowserThread::IO,
645 FROM_HERE, 645 FROM_HERE,
646 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); 646 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
647 } 647 }
648 648
649 } // namespace extensions 649 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698