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

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

Issue 12670013: Out-of-process import on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r196136 + modifications in extracted CLs Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h" 5 #include "chrome/browser/extensions/extension_system.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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // not succeed if the user has not logged in yet, in which case the 215 // not succeed if the user has not logged in yet, in which case the
216 // event routers are initialized in LoginUtilsImpl::CompleteLogin instead. 216 // event routers are initialized in LoginUtilsImpl::CompleteLogin instead.
217 // The InitEventRouters call used to be in BrowserMain, because when bookmark 217 // The InitEventRouters call used to be in BrowserMain, because when bookmark
218 // import happened on first run, the bookmark bar was not being correctly 218 // import happened on first run, the bookmark bar was not being correctly
219 // initialized (see issue 40144). Now that bookmarks aren't imported and 219 // initialized (see issue 40144). Now that bookmarks aren't imported and
220 // the event routers need to be initialized for every profile individually, 220 // the event routers need to be initialized for every profile individually,
221 // initialize them with the extension service. 221 // initialize them with the extension service.
222 // If import is going to run in a separate process (the profile itself is on 222 // If import is going to run in a separate process (the profile itself is on
223 // the main process), wait for import to finish before initializing the 223 // the main process), wait for import to finish before initializing the
224 // routers. 224 // routers.
225 CHECK(!ProfileManager::IsImportProcess(*command_line));
226 if (g_browser_process->profile_manager()->will_import()) { 225 if (g_browser_process->profile_manager()->will_import()) {
227 extension_service_->InitEventRoutersAfterImport(); 226 extension_service_->InitEventRoutersAfterImport();
228 } else { 227 } else {
229 extension_service_->InitEventRouters(); 228 extension_service_->InitEventRouters();
230 } 229 }
231 230
232 extension_warning_service_.reset(new ExtensionWarningService(profile_)); 231 extension_warning_service_.reset(new ExtensionWarningService(profile_));
233 extension_warning_badge_service_.reset( 232 extension_warning_badge_service_.reset(
234 new ExtensionWarningBadgeService(profile_)); 233 new ExtensionWarningBadgeService(profile_));
235 extension_warning_service_->AddObserver( 234 extension_warning_service_->AddObserver(
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 469 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
471 const std::string& extension_id, 470 const std::string& extension_id,
472 const extension_misc::UnloadedExtensionReason reason) { 471 const extension_misc::UnloadedExtensionReason reason) {
473 BrowserThread::PostTask( 472 BrowserThread::PostTask(
474 BrowserThread::IO, FROM_HERE, 473 BrowserThread::IO, FROM_HERE,
475 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), 474 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(),
476 extension_id, reason)); 475 extension_id, reason));
477 } 476 }
478 477
479 } // namespace extensions 478 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698