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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 base::DictionaryValue* manifest = ParseManifest(manifest_contents); | 401 base::DictionaryValue* manifest = ParseManifest(manifest_contents); |
402 | 402 |
403 if (manifest) { | 403 if (manifest) { |
404 manifest->SetString(manifest_keys::kName, name_string); | 404 manifest->SetString(manifest_keys::kName, name_string); |
405 manifest->SetString(manifest_keys::kDescription, description_string); | 405 manifest->SetString(manifest_keys::kDescription, description_string); |
406 Add(manifest, root_directory, true); | 406 Add(manifest, root_directory, true); |
407 } | 407 } |
408 } | 408 } |
409 | 409 |
410 void ComponentLoader::AddChromeApp() { | 410 void ComponentLoader::AddChromeApp() { |
411 #if defined(ENABLE_APP_LIST) | 411 #if BUILDFLAG(ENABLE_APP_LIST) |
412 AddWithNameAndDescription( | 412 AddWithNameAndDescription( |
413 IDR_CHROME_APP_MANIFEST, base::FilePath(FILE_PATH_LITERAL("chrome_app")), | 413 IDR_CHROME_APP_MANIFEST, base::FilePath(FILE_PATH_LITERAL("chrome_app")), |
414 l10n_util::GetStringUTF8(IDS_SHORT_PRODUCT_NAME), | 414 l10n_util::GetStringUTF8(IDS_SHORT_PRODUCT_NAME), |
415 l10n_util::GetStringUTF8(IDS_CHROME_SHORTCUT_DESCRIPTION)); | 415 l10n_util::GetStringUTF8(IDS_CHROME_SHORTCUT_DESCRIPTION)); |
416 #endif | 416 #endif |
417 } | 417 } |
418 | 418 |
419 void ComponentLoader::AddKeyboardApp() { | 419 void ComponentLoader::AddKeyboardApp() { |
420 #if defined(OS_CHROMEOS) | 420 #if defined(OS_CHROMEOS) |
421 Add(IDR_KEYBOARD_MANIFEST, base::FilePath(FILE_PATH_LITERAL("keyboard"))); | 421 Add(IDR_KEYBOARD_MANIFEST, base::FilePath(FILE_PATH_LITERAL("keyboard"))); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 manifest.release(), | 690 manifest.release(), |
691 root_directory, | 691 root_directory, |
692 false); | 692 false); |
693 CHECK_EQ(extension_id, actual_extension_id); | 693 CHECK_EQ(extension_id, actual_extension_id); |
694 if (!done_cb.is_null()) | 694 if (!done_cb.is_null()) |
695 done_cb.Run(); | 695 done_cb.Run(); |
696 } | 696 } |
697 #endif | 697 #endif |
698 | 698 |
699 } // namespace extensions | 699 } // namespace extensions |
OLD | NEW |