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

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

Issue 2509753006: Revert of Plumbing for login apps device policy to extensions. (Closed)
Patch Set: Created 4 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 service_worker_manager_.reset(new ServiceWorkerManager(profile_)); 199 service_worker_manager_.reset(new ServiceWorkerManager(profile_));
200 200
201 shared_user_script_master_.reset(new SharedUserScriptMaster(profile_)); 201 shared_user_script_master_.reset(new SharedUserScriptMaster(profile_));
202 202
203 // ExtensionService depends on RuntimeData. 203 // ExtensionService depends on RuntimeData.
204 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_))); 204 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_)));
205 205
206 bool autoupdate_enabled = !profile_->IsGuestSession() && 206 bool autoupdate_enabled = !profile_->IsGuestSession() &&
207 !profile_->IsSystemProfile(); 207 !profile_->IsSystemProfile();
208 #if defined(OS_CHROMEOS) 208 #if defined(OS_CHROMEOS)
209 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
210 switches::kEnableSigninApps) &&
211 chromeos::ProfileHelper::IsSigninProfile(profile_)) {
212 extensions_enabled = true;
213 }
214 if (!extensions_enabled) 209 if (!extensions_enabled)
215 autoupdate_enabled = false; 210 autoupdate_enabled = false;
216 #endif // defined(OS_CHROMEOS) 211 #endif // defined(OS_CHROMEOS)
217 extension_service_.reset(new ExtensionService( 212 extension_service_.reset(new ExtensionService(
218 profile_, base::CommandLine::ForCurrentProcess(), 213 profile_, base::CommandLine::ForCurrentProcess(),
219 profile_->GetPath().AppendASCII(extensions::kInstallDirectoryName), 214 profile_->GetPath().AppendASCII(extensions::kInstallDirectoryName),
220 ExtensionPrefs::Get(profile_), Blacklist::Get(profile_), 215 ExtensionPrefs::Get(profile_), Blacklist::Get(profile_),
221 autoupdate_enabled, extensions_enabled, &ready_)); 216 autoupdate_enabled, extensions_enabled, &ready_));
222 217
223 uninstall_ping_sender_.reset(new UninstallPingSender( 218 uninstall_ping_sender_.reset(new UninstallPingSender(
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 465 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
471 const std::string& extension_id, 466 const std::string& extension_id,
472 const UnloadedExtensionInfo::Reason reason) { 467 const UnloadedExtensionInfo::Reason reason) {
473 BrowserThread::PostTask( 468 BrowserThread::PostTask(
474 BrowserThread::IO, 469 BrowserThread::IO,
475 FROM_HERE, 470 FROM_HERE,
476 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); 471 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
477 } 472 }
478 473
479 } // namespace extensions 474 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_management.cc ('k') | chrome/browser/extensions/external_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698