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