OLD | NEW |
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 <string> | 7 #include <string> |
8 | 8 |
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 | 62 |
63 int manifest_resource_id = IDR_GAIA_AUTH_MANIFEST; | 63 int manifest_resource_id = IDR_GAIA_AUTH_MANIFEST; |
64 if (chromeos::system::InputDeviceSettings::Get() | 64 if (chromeos::system::InputDeviceSettings::Get() |
65 ->ForceKeyboardDrivenUINavigation()) { | 65 ->ForceKeyboardDrivenUINavigation()) { |
66 manifest_resource_id = IDR_GAIA_AUTH_KEYBOARD_MANIFEST; | 66 manifest_resource_id = IDR_GAIA_AUTH_KEYBOARD_MANIFEST; |
67 } else if (!command_line->HasSwitch(chromeos::switches::kDisableSamlSignin)) { | 67 } else if (!command_line->HasSwitch(chromeos::switches::kDisableSamlSignin)) { |
68 manifest_resource_id = IDR_GAIA_AUTH_SAML_MANIFEST; | 68 manifest_resource_id = IDR_GAIA_AUTH_SAML_MANIFEST; |
69 } | 69 } |
70 #else | 70 #else |
71 int manifest_resource_id = IDR_GAIA_AUTH_INLINE_MANIFEST; | 71 int manifest_resource_id = IDR_GAIA_AUTH_DESKTOP_MANIFEST; |
72 #endif | 72 #endif |
73 | 73 |
74 component_loader->Add(manifest_resource_id, | 74 component_loader->Add(manifest_resource_id, |
75 base::FilePath(FILE_PATH_LITERAL("gaia_auth"))); | 75 base::FilePath(FILE_PATH_LITERAL("gaia_auth"))); |
76 } | 76 } |
77 | 77 |
78 void UnloadGaiaAuthExtension(Profile* profile) { | 78 void UnloadGaiaAuthExtension(Profile* profile) { |
79 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 79 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
80 | 80 |
81 const char kGaiaAuthId[] = "mfffpogegjflfpflabcdkioaeobkgjik"; | 81 const char kGaiaAuthId[] = "mfffpogegjflfpflabcdkioaeobkgjik"; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 static base::LazyInstance<ProfileKeyedAPIFactory<GaiaAuthExtensionLoader> > | 121 static base::LazyInstance<ProfileKeyedAPIFactory<GaiaAuthExtensionLoader> > |
122 g_factory = LAZY_INSTANCE_INITIALIZER; | 122 g_factory = LAZY_INSTANCE_INITIALIZER; |
123 | 123 |
124 // static | 124 // static |
125 ProfileKeyedAPIFactory<GaiaAuthExtensionLoader>* | 125 ProfileKeyedAPIFactory<GaiaAuthExtensionLoader>* |
126 GaiaAuthExtensionLoader::GetFactoryInstance() { | 126 GaiaAuthExtensionLoader::GetFactoryInstance() { |
127 return g_factory.Pointer(); | 127 return g_factory.Pointer(); |
128 } | 128 } |
129 | 129 |
130 } // namespace extensions | 130 } // namespace extensions |
OLD | NEW |