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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 7400003: Start the extension event routers for each profile, not just at browser startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 5 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
« no previous file with comments | « chrome/browser/extensions/extension_browser_event_router.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 // Load any extensions specified with --load-extension. 477 // Load any extensions specified with --load-extension.
478 if (command_line->HasSwitch(switches::kLoadExtension)) { 478 if (command_line->HasSwitch(switches::kLoadExtension)) {
479 FilePath path = command_line->GetSwitchValuePath( 479 FilePath path = command_line->GetSwitchValuePath(
480 switches::kLoadExtension); 480 switches::kLoadExtension);
481 extension_service_->LoadExtensionFromCommandLine(path); 481 extension_service_->LoadExtensionFromCommandLine(path);
482 } 482 }
483 } 483 }
484 484
485 // Make the chrome://extension-icon/ resource available. 485 // Make the chrome://extension-icon/ resource available.
486 GetChromeURLDataManager()->AddDataSource(new ExtensionIconSource(this)); 486 GetChromeURLDataManager()->AddDataSource(new ExtensionIconSource(this));
487
488 // Initialize extension event routers. Note that on Chrome OS, this will
489 // not succeed if the user has not logged in yet, in which case the
490 // event routers are initialized in LoginUtilsImpl::CompleteLogin instead.
491 // The InitEventRouters call used to be in BrowserMain, because when bookmark
492 // import happened on first run, the bookmark bar was not being correctly
493 // initialized (see issue 40144). Now that bookmarks aren't imported and
494 // the event routers need to be initialized for every profile individually,
495 // initialize them with the extension service.
496 extension_service_->InitEventRouters();
487 } 497 }
488 498
489 void ProfileImpl::RegisterComponentExtensions() { 499 void ProfileImpl::RegisterComponentExtensions() {
490 // Register the component extensions. 500 // Register the component extensions.
491 // 501 //
492 // Component extension manifest must contain a 'key' property with a unique 502 // Component extension manifest must contain a 'key' property with a unique
493 // public key, serialized in base64. You can create a suitable value with the 503 // public key, serialized in base64. You can create a suitable value with the
494 // following commands on a unixy system: 504 // following commands on a unixy system:
495 // 505 //
496 // ssh-keygen -t rsa -b 1024 -N '' -f /tmp/key.pem 506 // ssh-keygen -t rsa -b 1024 -N '' -f /tmp/key.pem
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 if (!prerender::PrerenderManager::IsPrerenderingPossible()) 1712 if (!prerender::PrerenderManager::IsPrerenderingPossible())
1703 return NULL; 1713 return NULL;
1704 if (!prerender_manager_.get()) { 1714 if (!prerender_manager_.get()) {
1705 CHECK(g_browser_process->prerender_tracker()); 1715 CHECK(g_browser_process->prerender_tracker());
1706 prerender_manager_.reset( 1716 prerender_manager_.reset(
1707 new prerender::PrerenderManager( 1717 new prerender::PrerenderManager(
1708 this, g_browser_process->prerender_tracker())); 1718 this, g_browser_process->prerender_tracker()));
1709 } 1719 }
1710 return prerender_manager_.get(); 1720 return prerender_manager_.get();
1711 } 1721 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browser_event_router.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698