| 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/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.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::kEnableSamlSignin)) | 51 else if (command_line->HasSwitch(chromeos::switches::kEnableSamlSignin)) |
| 52 manifest_resource_id = IDR_GAIA_AUTH_SAML_MANIFEST; | 52 manifest_resource_id = IDR_GAIA_AUTH_SAML_MANIFEST; |
| 53 #else | 53 #else |
| 54 if (command_line->HasSwitch(switches::kEnableInlineSignin)) | 54 manifest_resource_id = IDR_GAIA_AUTH_INLINE_MANIFEST; |
| 55 manifest_resource_id = IDR_GAIA_AUTH_INLINE_MANIFEST; | |
| 56 #endif | 55 #endif |
| 57 | 56 |
| 58 component_loader->Add(manifest_resource_id, | 57 component_loader->Add(manifest_resource_id, |
| 59 base::FilePath(FILE_PATH_LITERAL("gaia_auth"))); | 58 base::FilePath(FILE_PATH_LITERAL("gaia_auth"))); |
| 60 } | 59 } |
| 61 | 60 |
| 62 void UnloadGaiaAuthExtension(Profile* profile) { | 61 void UnloadGaiaAuthExtension(Profile* profile) { |
| 63 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 62 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 64 | 63 |
| 65 const char kGaiaAuthId[] = "mfffpogegjflfpflabcdkioaeobkgjik"; | 64 const char kGaiaAuthId[] = "mfffpogegjflfpflabcdkioaeobkgjik"; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 static base::LazyInstance<ProfileKeyedAPIFactory<GaiaAuthExtensionLoader> > | 100 static base::LazyInstance<ProfileKeyedAPIFactory<GaiaAuthExtensionLoader> > |
| 102 g_factory = LAZY_INSTANCE_INITIALIZER; | 101 g_factory = LAZY_INSTANCE_INITIALIZER; |
| 103 | 102 |
| 104 // static | 103 // static |
| 105 ProfileKeyedAPIFactory<GaiaAuthExtensionLoader>* | 104 ProfileKeyedAPIFactory<GaiaAuthExtensionLoader>* |
| 106 GaiaAuthExtensionLoader::GetFactoryInstance() { | 105 GaiaAuthExtensionLoader::GetFactoryInstance() { |
| 107 return &g_factory.Get(); | 106 return &g_factory.Get(); |
| 108 } | 107 } |
| 109 | 108 |
| 110 } // namespace extensions | 109 } // namespace extensions |
| OLD | NEW |