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

Side by Side Diff: chrome/browser/extensions/signin/gaia_auth_extension_loader.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/signin/gaia_auth_extension_loader.h" 5 #include "chrome/browser/extensions/signin/gaia_auth_extension_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 22 matching lines...) Expand all
33 extensions::ExtensionSystem* extension_system = 33 extensions::ExtensionSystem* extension_system =
34 extensions::ExtensionSystem::Get(context); 34 extensions::ExtensionSystem::Get(context);
35 ExtensionService* extension_service = extension_system->extension_service(); 35 ExtensionService* extension_service = extension_system->extension_service();
36 return extension_service->component_loader(); 36 return extension_service->component_loader();
37 } 37 }
38 38
39 void LoadGaiaAuthExtension(BrowserContext* context) { 39 void LoadGaiaAuthExtension(BrowserContext* context) {
40 DCHECK_CURRENTLY_ON(BrowserThread::UI); 40 DCHECK_CURRENTLY_ON(BrowserThread::UI);
41 41
42 extensions::ComponentLoader* component_loader = GetComponentLoader(context); 42 extensions::ComponentLoader* component_loader = GetComponentLoader(context);
43 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 43 const base::CommandLine* command_line =
44 base::CommandLine::ForCurrentProcess();
44 if (command_line->HasSwitch(switches::kAuthExtensionPath)) { 45 if (command_line->HasSwitch(switches::kAuthExtensionPath)) {
45 base::FilePath auth_extension_path = 46 base::FilePath auth_extension_path =
46 command_line->GetSwitchValuePath(switches::kAuthExtensionPath); 47 command_line->GetSwitchValuePath(switches::kAuthExtensionPath);
47 component_loader->Add(IDR_GAIA_AUTH_MANIFEST, auth_extension_path); 48 component_loader->Add(IDR_GAIA_AUTH_MANIFEST, auth_extension_path);
48 return; 49 return;
49 } 50 }
50 51
51 int manifest_resource_id = IDR_GAIA_AUTH_MANIFEST; 52 int manifest_resource_id = IDR_GAIA_AUTH_MANIFEST;
52 53
53 #if defined(OS_CHROMEOS) 54 #if defined(OS_CHROMEOS)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 BrowserContextKeyedAPIFactory<GaiaAuthExtensionLoader> > g_factory = 120 BrowserContextKeyedAPIFactory<GaiaAuthExtensionLoader> > g_factory =
120 LAZY_INSTANCE_INITIALIZER; 121 LAZY_INSTANCE_INITIALIZER;
121 122
122 // static 123 // static
123 BrowserContextKeyedAPIFactory<GaiaAuthExtensionLoader>* 124 BrowserContextKeyedAPIFactory<GaiaAuthExtensionLoader>*
124 GaiaAuthExtensionLoader::GetFactoryInstance() { 125 GaiaAuthExtensionLoader::GetFactoryInstance() {
125 return g_factory.Pointer(); 126 return g_factory.Pointer();
126 } 127 }
127 128
128 } // namespace extensions 129 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/process_management_browsertest.cc ('k') | chrome/browser/extensions/startup_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698