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

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

Issue 2389703005: Deprecate --load-component-extension command line flag (Closed)
Patch Set: Rebase master Created 4 years 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 extension_service_->component_loader()-> 247 extension_service_->component_loader()->
248 AddDefaultComponentExtensionsForKioskMode(skip_session_extensions); 248 AddDefaultComponentExtensionsForKioskMode(skip_session_extensions);
249 } else { 249 } else {
250 extension_service_->component_loader()->AddDefaultComponentExtensions( 250 extension_service_->component_loader()->AddDefaultComponentExtensions(
251 skip_session_extensions); 251 skip_session_extensions);
252 } 252 }
253 #else 253 #else
254 extension_service_->component_loader()->AddDefaultComponentExtensions( 254 extension_service_->component_loader()->AddDefaultComponentExtensions(
255 skip_session_extensions); 255 skip_session_extensions);
256 #endif 256 #endif
257 if (command_line->HasSwitch(switches::kLoadComponentExtension)) {
258 base::CommandLine::StringType path_list =
259 command_line->GetSwitchValueNative(switches::kLoadComponentExtension);
260 base::StringTokenizerT<base::CommandLine::StringType,
261 base::CommandLine::StringType::const_iterator>
262 t(path_list, FILE_PATH_LITERAL(","));
263 while (t.GetNext()) {
264 // Load the component extension manifest synchronously.
265 // Blocking the UI thread is acceptable here since
266 // this flag designated for developers.
267 base::ThreadRestrictions::ScopedAllowIO allow_io;
268 extension_service_->component_loader()->AddOrReplace(
269 base::FilePath(t.token()));
270 }
271 }
272 257
273 app_sorting_.reset(new ChromeAppSorting(profile_)); 258 app_sorting_.reset(new ChromeAppSorting(profile_));
274 259
275 InitInstallGates(); 260 InitInstallGates();
276 261
277 extension_service_->Init(); 262 extension_service_->Init();
278 263
279 // Make sure ExtensionSyncService is created. 264 // Make sure ExtensionSyncService is created.
280 ExtensionSyncService::Get(profile_); 265 ExtensionSyncService::Get(profile_);
281 266
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 452 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
468 const std::string& extension_id, 453 const std::string& extension_id,
469 const UnloadedExtensionInfo::Reason reason) { 454 const UnloadedExtensionInfo::Reason reason) {
470 BrowserThread::PostTask( 455 BrowserThread::PostTask(
471 BrowserThread::IO, 456 BrowserThread::IO,
472 FROM_HERE, 457 FROM_HERE,
473 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); 458 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
474 } 459 }
475 460
476 } // namespace extensions 461 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_startup_browsertest.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698