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

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

Issue 10941003: Reset registered events and dispatch runtime.onInstalled to all extensions when (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ? Created 8 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 | 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/string_tokenizer.h" 10 #include "base/string_tokenizer.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void ExtensionSystemImpl::Shared::RegisterManagementPolicyProviders() { 98 void ExtensionSystemImpl::Shared::RegisterManagementPolicyProviders() {
99 DCHECK(extension_prefs_.get()); 99 DCHECK(extension_prefs_.get());
100 management_policy_->RegisterProvider(extension_prefs_.get()); 100 management_policy_->RegisterProvider(extension_prefs_.get());
101 } 101 }
102 102
103 void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) { 103 void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {
104 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 104 const CommandLine* command_line = CommandLine::ForCurrentProcess();
105 105
106 lazy_background_task_queue_.reset(new LazyBackgroundTaskQueue(profile_)); 106 lazy_background_task_queue_.reset(new LazyBackgroundTaskQueue(profile_));
107 message_service_.reset(new MessageService(lazy_background_task_queue_.get())); 107 message_service_.reset(new MessageService(lazy_background_task_queue_.get()));
108 extension_event_router_.reset(new EventRouter(profile_)); 108 extension_event_router_.reset(new EventRouter(profile_,
109 extension_prefs_.get()));
109 navigation_observer_.reset(new NavigationObserver(profile_)); 110 navigation_observer_.reset(new NavigationObserver(profile_));
110 111
111 ExtensionErrorReporter::Init(true); // allow noisy errors. 112 ExtensionErrorReporter::Init(true); // allow noisy errors.
112 113
113 user_script_master_ = new UserScriptMaster(profile_); 114 user_script_master_ = new UserScriptMaster(profile_);
114 115
115 bool autoupdate_enabled = true; 116 bool autoupdate_enabled = true;
116 #if defined(OS_CHROMEOS) 117 #if defined(OS_CHROMEOS)
117 if (!extensions_enabled) 118 if (!extensions_enabled)
118 autoupdate_enabled = false; 119 autoupdate_enabled = false;
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 394 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
394 const std::string& extension_id, 395 const std::string& extension_id,
395 const extension_misc::UnloadedExtensionReason reason) { 396 const extension_misc::UnloadedExtensionReason reason) {
396 BrowserThread::PostTask( 397 BrowserThread::PostTask(
397 BrowserThread::IO, FROM_HERE, 398 BrowserThread::IO, FROM_HERE,
398 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), 399 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(),
399 extension_id, reason)); 400 extension_id, reason));
400 } 401 }
401 402
402 } // namespace extensions 403 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698