| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/component_loader.h" | 5 #include "chrome/browser/extensions/component_loader.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/json/json_string_value_serializer.h" | 9 #include "base/json/json_string_value_serializer.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 Add(IDR_WALLPAPERMANAGER_MANIFEST, | 317 Add(IDR_WALLPAPERMANAGER_MANIFEST, |
| 318 FilePath(FILE_PATH_LITERAL("chromeos/wallpaper_manager"))); | 318 FilePath(FILE_PATH_LITERAL("chromeos/wallpaper_manager"))); |
| 319 } | 319 } |
| 320 #endif | 320 #endif |
| 321 | 321 |
| 322 #if defined(FILE_MANAGER_EXTENSION) | 322 #if defined(FILE_MANAGER_EXTENSION) |
| 323 AddFileManagerExtension(); | 323 AddFileManagerExtension(); |
| 324 #endif | 324 #endif |
| 325 | 325 |
| 326 #if defined(OS_CHROMEOS) | 326 #if defined(OS_CHROMEOS) |
| 327 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 328 if (command_line->HasSwitch(switches::kEnableBackgroundLoader)) { |
| 329 Add(IDR_BACKLOADER_MANIFEST, |
| 330 FilePath(FILE_PATH_LITERAL("backloader"))); |
| 331 } |
| 332 |
| 327 Add(IDR_MOBILE_MANIFEST, | 333 Add(IDR_MOBILE_MANIFEST, |
| 328 FilePath(FILE_PATH_LITERAL("/usr/share/chromeos-assets/mobile"))); | 334 FilePath(FILE_PATH_LITERAL("/usr/share/chromeos-assets/mobile"))); |
| 329 | 335 |
| 330 Add(IDR_CROSH_BUILTIN_MANIFEST, FilePath(FILE_PATH_LITERAL( | 336 Add(IDR_CROSH_BUILTIN_MANIFEST, FilePath(FILE_PATH_LITERAL( |
| 331 "/usr/share/chromeos-assets/crosh_builtin"))); | 337 "/usr/share/chromeos-assets/crosh_builtin"))); |
| 332 | 338 |
| 333 AddGaiaAuthExtension(); | 339 AddGaiaAuthExtension(); |
| 334 | 340 |
| 335 // TODO(gauravsh): Only include echo extension on official builds. | 341 // TODO(gauravsh): Only include echo extension on official builds. |
| 336 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | |
| 337 FilePath echo_extension_path(FILE_PATH_LITERAL( | 342 FilePath echo_extension_path(FILE_PATH_LITERAL( |
| 338 "/usr/share/chromeos-assets/echo")); | 343 "/usr/share/chromeos-assets/echo")); |
| 339 if (command_line->HasSwitch(switches::kEchoExtensionPath)) { | 344 if (command_line->HasSwitch(switches::kEchoExtensionPath)) { |
| 340 echo_extension_path = | 345 echo_extension_path = |
| 341 command_line->GetSwitchValuePath(switches::kEchoExtensionPath); | 346 command_line->GetSwitchValuePath(switches::kEchoExtensionPath); |
| 342 } | 347 } |
| 343 Add(IDR_ECHO_MANIFEST, echo_extension_path); | 348 Add(IDR_ECHO_MANIFEST, echo_extension_path); |
| 344 | 349 |
| 345 #if defined(OFFICIAL_BUILD) | 350 #if defined(OFFICIAL_BUILD) |
| 346 if (browser_defaults::enable_help_app) { | 351 if (browser_defaults::enable_help_app) { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 void ComponentLoader::RegisterUserPrefs(PrefService* prefs) { | 402 void ComponentLoader::RegisterUserPrefs(PrefService* prefs) { |
| 398 prefs->RegisterStringPref(prefs::kEnterpriseWebStoreURL, | 403 prefs->RegisterStringPref(prefs::kEnterpriseWebStoreURL, |
| 399 std::string() /* default_value */, | 404 std::string() /* default_value */, |
| 400 PrefService::UNSYNCABLE_PREF); | 405 PrefService::UNSYNCABLE_PREF); |
| 401 prefs->RegisterStringPref(prefs::kEnterpriseWebStoreName, | 406 prefs->RegisterStringPref(prefs::kEnterpriseWebStoreName, |
| 402 std::string() /* default_value */, | 407 std::string() /* default_value */, |
| 403 PrefService::UNSYNCABLE_PREF); | 408 PrefService::UNSYNCABLE_PREF); |
| 404 } | 409 } |
| 405 | 410 |
| 406 } // namespace extensions | 411 } // namespace extensions |
| OLD | NEW |