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

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

Issue 23724026: BrowserEventRouter -> TabsEventRouter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yoyo's nits Created 7 years, 3 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
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | 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) 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 std::string extension_id; 199 std::string extension_id;
200 UnpackedInstaller::Create(extension_service_.get())-> 200 UnpackedInstaller::Create(extension_service_.get())->
201 LoadFromCommandLine(base::FilePath(t.token()), &extension_id); 201 LoadFromCommandLine(base::FilePath(t.token()), &extension_id);
202 } 202 }
203 } 203 }
204 } 204 }
205 205
206 // Make the chrome://extension-icon/ resource available. 206 // Make the chrome://extension-icon/ resource available.
207 content::URLDataSource::Add(profile_, new ExtensionIconSource(profile_)); 207 content::URLDataSource::Add(profile_, new ExtensionIconSource(profile_));
208 208
209 // Initialize extension event routers. Note that on Chrome OS, this will
210 // not succeed if the user has not logged in yet, in which case the
211 // event routers are initialized in LoginUtilsImpl::CompleteLogin instead.
212 // The InitEventRouters call used to be in BrowserMain, because when bookmark
213 // import happened on first run, the bookmark bar was not being correctly
214 // initialized (see issue 40144). Now that bookmarks aren't imported and
215 // the event routers need to be initialized for every profile individually,
216 // initialize them with the extension service.
217 extension_service_->InitEventRouters();
218
219 extension_warning_service_.reset(new ExtensionWarningService(profile_)); 209 extension_warning_service_.reset(new ExtensionWarningService(profile_));
220 extension_warning_badge_service_.reset( 210 extension_warning_badge_service_.reset(
221 new ExtensionWarningBadgeService(profile_)); 211 new ExtensionWarningBadgeService(profile_));
222 extension_warning_service_->AddObserver( 212 extension_warning_service_->AddObserver(
223 extension_warning_badge_service_.get()); 213 extension_warning_badge_service_.get());
224 error_console_.reset(new ErrorConsole(profile_, extension_service_.get())); 214 error_console_.reset(new ErrorConsole(profile_, extension_service_.get()));
225 } 215 }
226 216
227 void ExtensionSystemImpl::Shared::Shutdown() { 217 void ExtensionSystemImpl::Shared::Shutdown() {
228 if (extension_warning_service_) { 218 if (extension_warning_service_) {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 382 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
393 const std::string& extension_id, 383 const std::string& extension_id,
394 const extension_misc::UnloadedExtensionReason reason) { 384 const extension_misc::UnloadedExtensionReason reason) {
395 BrowserThread::PostTask( 385 BrowserThread::PostTask(
396 BrowserThread::IO, FROM_HERE, 386 BrowserThread::IO, FROM_HERE,
397 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), 387 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(),
398 extension_id, reason)); 388 extension_id, reason));
399 } 389 }
400 390
401 } // namespace extensions 391 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698