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::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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 static base::LazyInstance<ProfileKeyedAPIFactory<GaiaAuthExtensionLoader> > | 100 static base::LazyInstance<ProfileKeyedAPIFactory<GaiaAuthExtensionLoader> > |
101 g_factory = LAZY_INSTANCE_INITIALIZER; | 101 g_factory = LAZY_INSTANCE_INITIALIZER; |
102 | 102 |
103 // static | 103 // static |
104 ProfileKeyedAPIFactory<GaiaAuthExtensionLoader>* | 104 ProfileKeyedAPIFactory<GaiaAuthExtensionLoader>* |
105 GaiaAuthExtensionLoader::GetFactoryInstance() { | 105 GaiaAuthExtensionLoader::GetFactoryInstance() { |
106 return g_factory.Pointer(); | 106 return g_factory.Pointer(); |
107 } | 107 } |
108 | 108 |
109 } // namespace extensions | 109 } // namespace extensions |
OLD | NEW |