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

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

Issue 15947007: Move application restart and relaunch code out of ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pafooey Created 7 years, 6 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // Load any extensions specified with --load-extension. 180 // Load any extensions specified with --load-extension.
181 // TODO(yoz): Seems like this should move into ExtensionService::Init. 181 // TODO(yoz): Seems like this should move into ExtensionService::Init.
182 // But maybe it's no longer important. 182 // But maybe it's no longer important.
183 if (command_line->HasSwitch(switches::kLoadExtension)) { 183 if (command_line->HasSwitch(switches::kLoadExtension)) {
184 CommandLine::StringType path_list = command_line->GetSwitchValueNative( 184 CommandLine::StringType path_list = command_line->GetSwitchValueNative(
185 switches::kLoadExtension); 185 switches::kLoadExtension);
186 base::StringTokenizerT<CommandLine::StringType, 186 base::StringTokenizerT<CommandLine::StringType,
187 CommandLine::StringType::const_iterator> t(path_list, 187 CommandLine::StringType::const_iterator> t(path_list,
188 FILE_PATH_LITERAL(",")); 188 FILE_PATH_LITERAL(","));
189 while (t.GetNext()) { 189 while (t.GetNext()) {
190 std::string extension_id;
190 UnpackedInstaller::Create(extension_service_.get())-> 191 UnpackedInstaller::Create(extension_service_.get())->
191 LoadFromCommandLine(base::FilePath(t.token()), false); 192 LoadFromCommandLine(base::FilePath(t.token()), &extension_id);
192 } 193 }
193 } 194 }
194 } 195 }
195 196
196 // Make the chrome://extension-icon/ resource available. 197 // Make the chrome://extension-icon/ resource available.
197 content::URLDataSource::Add(profile_, new ExtensionIconSource(profile_)); 198 content::URLDataSource::Add(profile_, new ExtensionIconSource(profile_));
198 199
199 // Initialize extension event routers. Note that on Chrome OS, this will 200 // Initialize extension event routers. Note that on Chrome OS, this will
200 // not succeed if the user has not logged in yet, in which case the 201 // not succeed if the user has not logged in yet, in which case the
201 // event routers are initialized in LoginUtilsImpl::CompleteLogin instead. 202 // event routers are initialized in LoginUtilsImpl::CompleteLogin instead.
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 416 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
416 const std::string& extension_id, 417 const std::string& extension_id,
417 const extension_misc::UnloadedExtensionReason reason) { 418 const extension_misc::UnloadedExtensionReason reason) {
418 BrowserThread::PostTask( 419 BrowserThread::PostTask(
419 BrowserThread::IO, FROM_HERE, 420 BrowserThread::IO, FROM_HERE,
420 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), 421 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(),
421 extension_id, reason)); 422 extension_id, reason));
422 } 423 }
423 424
424 } // namespace extensions 425 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/load_and_launch_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698