| 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 "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/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 int manifest_resource_id = IDR_GAIA_AUTH_MANIFEST; | 46 int manifest_resource_id = IDR_GAIA_AUTH_MANIFEST; |
| 47 | 47 |
| 48 #if defined(OS_CHROMEOS) | 48 #if defined(OS_CHROMEOS) |
| 49 if (chromeos::system::keyboard_settings::ForceKeyboardDrivenUINavigation()) | 49 if (chromeos::system::keyboard_settings::ForceKeyboardDrivenUINavigation()) |
| 50 manifest_resource_id = IDR_GAIA_AUTH_KEYBOARD_MANIFEST; | 50 manifest_resource_id = IDR_GAIA_AUTH_KEYBOARD_MANIFEST; |
| 51 else if (!command_line->HasSwitch(chromeos::switches::kDisableSamlSignin)) | 51 else if (!command_line->HasSwitch(chromeos::switches::kDisableSamlSignin)) |
| 52 manifest_resource_id = IDR_GAIA_AUTH_SAML_MANIFEST; | 52 manifest_resource_id = IDR_GAIA_AUTH_SAML_MANIFEST; |
| 53 #else | 53 #else |
| 54 manifest_resource_id = IDR_GAIA_AUTH_INLINE_MANIFEST; | 54 manifest_resource_id = IDR_GAIA_AUTH_DESKTOP_MANIFEST; |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 component_loader->Add(manifest_resource_id, | 57 component_loader->Add(manifest_resource_id, |
| 58 base::FilePath(FILE_PATH_LITERAL("gaia_auth"))); | 58 base::FilePath(FILE_PATH_LITERAL("gaia_auth"))); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void UnloadGaiaAuthExtension(Profile* profile) { | 61 void UnloadGaiaAuthExtension(Profile* profile) { |
| 62 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 62 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 63 | 63 |
| 64 const char kGaiaAuthId[] = "mfffpogegjflfpflabcdkioaeobkgjik"; | 64 const char kGaiaAuthId[] = "mfffpogegjflfpflabcdkioaeobkgjik"; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 static base::LazyInstance<ProfileKeyedAPIFactory<GaiaAuthExtensionLoader> > | 104 static base::LazyInstance<ProfileKeyedAPIFactory<GaiaAuthExtensionLoader> > |
| 105 g_factory = LAZY_INSTANCE_INITIALIZER; | 105 g_factory = LAZY_INSTANCE_INITIALIZER; |
| 106 | 106 |
| 107 // static | 107 // static |
| 108 ProfileKeyedAPIFactory<GaiaAuthExtensionLoader>* | 108 ProfileKeyedAPIFactory<GaiaAuthExtensionLoader>* |
| 109 GaiaAuthExtensionLoader::GetFactoryInstance() { | 109 GaiaAuthExtensionLoader::GetFactoryInstance() { |
| 110 return g_factory.Pointer(); | 110 return g_factory.Pointer(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace extensions | 113 } // namespace extensions |
| OLD | NEW |