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

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

Issue 6976030: Start the event routers with the extension service, so that they're correctly started for each pr... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Reland, now that event routers have been fixed 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/browser_main.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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 // Load any extensions specified with --load-extension. 478 // Load any extensions specified with --load-extension.
479 if (command_line->HasSwitch(switches::kLoadExtension)) { 479 if (command_line->HasSwitch(switches::kLoadExtension)) {
480 FilePath path = command_line->GetSwitchValuePath( 480 FilePath path = command_line->GetSwitchValuePath(
481 switches::kLoadExtension); 481 switches::kLoadExtension);
482 extension_service_->LoadExtension(path); 482 extension_service_->LoadExtension(path);
483 } 483 }
484 } 484 }
485 485
486 // Make the chrome://extension-icon/ resource available. 486 // Make the chrome://extension-icon/ resource available.
487 GetChromeURLDataManager()->AddDataSource(new ExtensionIconSource(this)); 487 GetChromeURLDataManager()->AddDataSource(new ExtensionIconSource(this));
488
489 // Initialize extension event routers. Note that on Chrome OS, this will
490 // not succeed if the user has not logged in yet, in which case the
491 // event routers are initialized in LoginUtilsImpl::CompleteLogin instead.
492 // The InitEventRouters call used to be in BrowserMain, because when bookmark
493 // import happened on first run, the bookmark bar was not being correctly
494 // initialized (see issue 40144). Now that bookmarks aren't imported and
495 // the event routers need to be initialized for every profile individually,
496 // initialize them with the extension service.
497 extension_service_->InitEventRouters();
488 } 498 }
489 499
490 void ProfileImpl::RegisterComponentExtensions() { 500 void ProfileImpl::RegisterComponentExtensions() {
491 // Register the component extensions. 501 // Register the component extensions.
492 // 502 //
493 // Component extension manifest must contain a 'key' property with a unique 503 // Component extension manifest must contain a 'key' property with a unique
494 // public key, serialized in base64. You can create a suitable value with the 504 // public key, serialized in base64. You can create a suitable value with the
495 // following commands on a unixy system: 505 // following commands on a unixy system:
496 // 506 //
497 // ssh-keygen -t rsa -b 1024 -N '' -f /tmp/key.pem 507 // ssh-keygen -t rsa -b 1024 -N '' -f /tmp/key.pem
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 if (!prerender::PrerenderManager::IsPrerenderingPossible()) 1661 if (!prerender::PrerenderManager::IsPrerenderingPossible())
1652 return NULL; 1662 return NULL;
1653 if (!prerender_manager_.get()) { 1663 if (!prerender_manager_.get()) {
1654 CHECK(g_browser_process->prerender_tracker()); 1664 CHECK(g_browser_process->prerender_tracker());
1655 prerender_manager_.reset( 1665 prerender_manager_.reset(
1656 new prerender::PrerenderManager( 1666 new prerender::PrerenderManager(
1657 this, g_browser_process->prerender_tracker())); 1667 this, g_browser_process->prerender_tracker()));
1658 } 1668 }
1659 return prerender_manager_.get(); 1669 return prerender_manager_.get();
1660 } 1670 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698