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

Side by Side Diff: chrome/browser/profile.cc

Issue 2101019: Print Preview component extension (Closed)
Patch Set: Put it under a flag Created 10 years, 5 months 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/profile.h" 5 #include "chrome/browser/profile.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "app/theme_provider.h" 8 #include "app/theme_provider.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/env_var.h" 10 #include "base/env_var.h"
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 this, 849 this,
850 CommandLine::ForCurrentProcess(), 850 CommandLine::ForCurrentProcess(),
851 GetPrefs(), 851 GetPrefs(),
852 GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName), 852 GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName),
853 true); 853 true);
854 854
855 // Register the component extensions. 855 // Register the component extensions.
856 typedef std::list<std::pair<std::string, int> > ComponentExtensionList; 856 typedef std::list<std::pair<std::string, int> > ComponentExtensionList;
857 ComponentExtensionList component_extensions; 857 ComponentExtensionList component_extensions;
858 858
859 // Bookmark manager.
860 component_extensions.push_back( 859 component_extensions.push_back(
861 std::make_pair("bookmark_manager", IDR_BOOKMARKS_MANIFEST)); 860 std::make_pair("bookmark_manager", IDR_BOOKMARKS_MANIFEST));
861 if (command_line->HasSwitch(switches::kEnablePrintPreview)) {
862 component_extensions.push_back(
863 std::make_pair("print_preview", IDR_PRINT_PREVIEW_MANIFEST));
864 }
862 865
863 // Some sample apps to make our lives easier while we are developing extension 866 // Some sample apps to make our lives easier while we are developing extension
864 // apps. This way we don't have to constantly install these over and over. 867 // apps. This way we don't have to constantly install these over and over.
865 if (Extension::AppsAreEnabled() && IncludeDefaultApps()) { 868 if (Extension::AppsAreEnabled() && IncludeDefaultApps()) {
866 component_extensions.push_back( 869 component_extensions.push_back(
867 std::make_pair("gmail_app", IDR_GMAIL_APP_MANIFEST)); 870 std::make_pair("gmail_app", IDR_GMAIL_APP_MANIFEST));
868 component_extensions.push_back( 871 component_extensions.push_back(
869 std::make_pair("calendar_app", IDR_CALENDAR_APP_MANIFEST)); 872 std::make_pair("calendar_app", IDR_CALENDAR_APP_MANIFEST));
870 component_extensions.push_back( 873 component_extensions.push_back(
871 std::make_pair("docs_app", IDR_DOCS_APP_MANIFEST)); 874 std::make_pair("docs_app", IDR_DOCS_APP_MANIFEST));
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 new ProfileSyncFactoryImpl(this, CommandLine::ForCurrentProcess())); 1677 new ProfileSyncFactoryImpl(this, CommandLine::ForCurrentProcess()));
1675 sync_service_.reset( 1678 sync_service_.reset(
1676 profile_sync_factory_->CreateProfileSyncService()); 1679 profile_sync_factory_->CreateProfileSyncService());
1677 sync_service_->Initialize(); 1680 sync_service_->Initialize();
1678 } 1681 }
1679 1682
1680 void ProfileImpl::InitCloudPrintProxyService() { 1683 void ProfileImpl::InitCloudPrintProxyService() {
1681 cloud_print_proxy_service_.reset(new CloudPrintProxyService(this)); 1684 cloud_print_proxy_service_.reset(new CloudPrintProxyService(this));
1682 cloud_print_proxy_service_->Initialize(); 1685 cloud_print_proxy_service_->Initialize();
1683 } 1686 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/shared_resources_data_source.cc ('k') | chrome/browser/resources/print_preview/js/preview_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698