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

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

Issue 120343004: Reland r242290, r241609, r242134. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 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 "chrome/browser/extensions/component_loader.h" 8 #include "chrome/browser/extensions/component_loader.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/common/chrome_constants.h" 12 #include "chrome/common/chrome_constants.h"
13 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
14 #include "chrome/common/profile_management_switches.h"
15 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
16 #include "grit/browser_resources.h" 15 #include "grit/browser_resources.h"
17 16
18 #if defined(OS_CHROMEOS) 17 #if defined(OS_CHROMEOS)
19 #include "chrome/browser/chromeos/system/input_device_settings.h" 18 #include "chrome/browser/chromeos/system/input_device_settings.h"
20 #include "chromeos/chromeos_constants.h" 19 #include "chromeos/chromeos_constants.h"
21 #include "chromeos/chromeos_switches.h" 20 #include "chromeos/chromeos_switches.h"
22 #endif 21 #endif
23 22
24 using content::BrowserThread; 23 using content::BrowserThread;
(...skipping 20 matching lines...) Expand all
45 } 44 }
46 45
47 int manifest_resource_id = IDR_GAIA_AUTH_MANIFEST; 46 int manifest_resource_id = IDR_GAIA_AUTH_MANIFEST;
48 47
49 #if defined(OS_CHROMEOS) 48 #if defined(OS_CHROMEOS)
50 if (chromeos::system::keyboard_settings::ForceKeyboardDrivenUINavigation()) 49 if (chromeos::system::keyboard_settings::ForceKeyboardDrivenUINavigation())
51 manifest_resource_id = IDR_GAIA_AUTH_KEYBOARD_MANIFEST; 50 manifest_resource_id = IDR_GAIA_AUTH_KEYBOARD_MANIFEST;
52 else if (command_line->HasSwitch(chromeos::switches::kEnableSamlSignin)) 51 else if (command_line->HasSwitch(chromeos::switches::kEnableSamlSignin))
53 manifest_resource_id = IDR_GAIA_AUTH_SAML_MANIFEST; 52 manifest_resource_id = IDR_GAIA_AUTH_SAML_MANIFEST;
54 #else 53 #else
55 if (switches::IsEnableInlineSignin()) 54 manifest_resource_id = IDR_GAIA_AUTH_INLINE_MANIFEST;
56 manifest_resource_id = IDR_GAIA_AUTH_INLINE_MANIFEST;
57 #endif 55 #endif
58 56
59 component_loader->Add(manifest_resource_id, 57 component_loader->Add(manifest_resource_id,
60 base::FilePath(FILE_PATH_LITERAL("gaia_auth"))); 58 base::FilePath(FILE_PATH_LITERAL("gaia_auth")));
61 } 59 }
62 60
63 void UnloadGaiaAuthExtension(Profile* profile) { 61 void UnloadGaiaAuthExtension(Profile* profile) {
64 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 62 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
65 63
66 const char kGaiaAuthId[] = "mfffpogegjflfpflabcdkioaeobkgjik"; 64 const char kGaiaAuthId[] = "mfffpogegjflfpflabcdkioaeobkgjik";
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 static base::LazyInstance<ProfileKeyedAPIFactory<GaiaAuthExtensionLoader> > 100 static base::LazyInstance<ProfileKeyedAPIFactory<GaiaAuthExtensionLoader> >
103 g_factory = LAZY_INSTANCE_INITIALIZER; 101 g_factory = LAZY_INSTANCE_INITIALIZER;
104 102
105 // static 103 // static
106 ProfileKeyedAPIFactory<GaiaAuthExtensionLoader>* 104 ProfileKeyedAPIFactory<GaiaAuthExtensionLoader>*
107 GaiaAuthExtensionLoader::GetFactoryInstance() { 105 GaiaAuthExtensionLoader::GetFactoryInstance() {
108 return &g_factory.Get(); 106 return &g_factory.Get();
109 } 107 }
110 108
111 } // namespace extensions 109 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698