Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2570)

Side by Side Diff: chrome/browser/extensions/component_loader.cc

Issue 2458833005: Move printing defines to buildflag system. (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 22 matching lines...) Expand all
33 #include "components/crx_file/id_util.h" 33 #include "components/crx_file/id_util.h"
34 #include "components/version_info/version_info.h" 34 #include "components/version_info/version_info.h"
35 #include "content/public/browser/browser_thread.h" 35 #include "content/public/browser/browser_thread.h"
36 #include "content/public/browser/plugin_service.h" 36 #include "content/public/browser/plugin_service.h"
37 #include "content/public/common/content_switches.h" 37 #include "content/public/common/content_switches.h"
38 #include "extensions/common/constants.h" 38 #include "extensions/common/constants.h"
39 #include "extensions/common/extension.h" 39 #include "extensions/common/extension.h"
40 #include "extensions/common/extension_l10n_util.h" 40 #include "extensions/common/extension_l10n_util.h"
41 #include "extensions/common/file_util.h" 41 #include "extensions/common/file_util.h"
42 #include "extensions/common/manifest_constants.h" 42 #include "extensions/common/manifest_constants.h"
43 #include "printing/features/features.h"
43 #include "ui/base/l10n/l10n_util.h" 44 #include "ui/base/l10n/l10n_util.h"
44 #include "ui/base/resource/resource_bundle.h" 45 #include "ui/base/resource/resource_bundle.h"
45 46
46 #if defined(OS_CHROMEOS) 47 #if defined(OS_CHROMEOS)
47 #include "ash/common/system/chromeos/devicetype_utils.h" 48 #include "ash/common/system/chromeos/devicetype_utils.h"
48 #include "chromeos/chromeos_switches.h" 49 #include "chromeos/chromeos_switches.h"
49 #include "components/chrome_apps/grit/chrome_apps_resources.h" 50 #include "components/chrome_apps/grit/chrome_apps_resources.h"
50 #include "components/user_manager/user_manager.h" 51 #include "components/user_manager/user_manager.h"
51 #include "content/public/browser/site_instance.h" 52 #include "content/public/browser/site_instance.h"
52 #include "content/public/browser/storage_partition.h" 53 #include "content/public/browser/storage_partition.h"
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 481
481 Add(IDR_CROSH_BUILTIN_MANIFEST, base::FilePath(FILE_PATH_LITERAL( 482 Add(IDR_CROSH_BUILTIN_MANIFEST, base::FilePath(FILE_PATH_LITERAL(
482 "/usr/share/chromeos-assets/crosh_builtin"))); 483 "/usr/share/chromeos-assets/crosh_builtin")));
483 } 484 }
484 #else // defined(OS_CHROMEOS) 485 #else // defined(OS_CHROMEOS)
485 DCHECK(!skip_session_components); 486 DCHECK(!skip_session_components);
486 if (!MdBookmarksUI::IsEnabled()) { 487 if (!MdBookmarksUI::IsEnabled()) {
487 Add(IDR_BOOKMARKS_MANIFEST, 488 Add(IDR_BOOKMARKS_MANIFEST,
488 base::FilePath(FILE_PATH_LITERAL("bookmark_manager"))); 489 base::FilePath(FILE_PATH_LITERAL("bookmark_manager")));
489 } 490 }
490 #if defined(ENABLE_PRINTING) 491 #if BUILDFLAG(ENABLE_PRINTING)
491 // Cloud Print component app. Not required on Chrome OS. 492 // Cloud Print component app. Not required on Chrome OS.
492 Add(IDR_CLOUDPRINT_MANIFEST, 493 Add(IDR_CLOUDPRINT_MANIFEST,
493 base::FilePath(FILE_PATH_LITERAL("cloud_print"))); 494 base::FilePath(FILE_PATH_LITERAL("cloud_print")));
494 #endif // defined(ENABLE_PRINTING) 495 #endif // BUILDFLAG(ENABLE_PRINTING)
495 #endif // defined(OS_CHROMEOS) 496 #endif // defined(OS_CHROMEOS)
496 497
497 if (!skip_session_components) { 498 if (!skip_session_components) {
498 AddWebStoreApp(); 499 AddWebStoreApp();
499 AddChromeApp(); 500 AddChromeApp();
500 } 501 }
501 502
502 AddKeyboardApp(); 503 AddKeyboardApp();
503 504
504 AddDefaultComponentExtensionsWithBackgroundPages(skip_session_components); 505 AddDefaultComponentExtensionsWithBackgroundPages(skip_session_components);
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 manifest.release(), 696 manifest.release(),
696 root_directory, 697 root_directory,
697 false); 698 false);
698 CHECK_EQ(extension_id, actual_extension_id); 699 CHECK_EQ(extension_id, actual_extension_id);
699 if (!done_cb.is_null()) 700 if (!done_cb.is_null())
700 done_cb.Run(); 701 done_cb.Run();
701 } 702 }
702 #endif 703 #endif
703 704
704 } // namespace extensions 705 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698