OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/profiles/profile_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 #include "chrome/browser/status_icons/status_tray.h" | 65 #include "chrome/browser/status_icons/status_tray.h" |
66 #include "chrome/browser/sync/profile_sync_factory_impl.h" | 66 #include "chrome/browser/sync/profile_sync_factory_impl.h" |
67 #include "chrome/browser/sync/profile_sync_service.h" | 67 #include "chrome/browser/sync/profile_sync_service.h" |
68 #include "chrome/browser/tabs/pinned_tab_service_factory.h" | 68 #include "chrome/browser/tabs/pinned_tab_service_factory.h" |
69 #include "chrome/browser/transport_security_persister.h" | 69 #include "chrome/browser/transport_security_persister.h" |
70 #include "chrome/browser/ui/browser_list.h" | 70 #include "chrome/browser/ui/browser_list.h" |
71 #include "chrome/browser/ui/find_bar/find_bar_state.h" | 71 #include "chrome/browser/ui/find_bar/find_bar_state.h" |
72 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 72 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
73 #include "chrome/browser/ui/webui/extension_icon_source.h" | 73 #include "chrome/browser/ui/webui/extension_icon_source.h" |
74 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" | 74 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" |
| 75 #include "chrome/browser/ui/webui/print_preview_data_manager.h" |
75 #include "chrome/browser/user_style_sheet_watcher.h" | 76 #include "chrome/browser/user_style_sheet_watcher.h" |
76 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" | 77 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" |
77 #include "chrome/browser/visitedlink/visitedlink_master.h" | 78 #include "chrome/browser/visitedlink/visitedlink_master.h" |
78 #include "chrome/browser/web_resource/promo_resource_service.h" | 79 #include "chrome/browser/web_resource/promo_resource_service.h" |
79 #include "chrome/browser/webdata/web_data_service.h" | 80 #include "chrome/browser/webdata/web_data_service.h" |
80 #include "chrome/common/chrome_constants.h" | 81 #include "chrome/common/chrome_constants.h" |
81 #include "chrome/common/chrome_paths.h" | 82 #include "chrome/common/chrome_paths.h" |
82 #include "chrome/common/chrome_paths_internal.h" | 83 #include "chrome/common/chrome_paths_internal.h" |
83 #include "chrome/common/chrome_switches.h" | 84 #include "chrome/common/chrome_switches.h" |
84 #include "chrome/common/json_pref_store.h" | 85 #include "chrome/common/json_pref_store.h" |
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1509 ExtensionInfoMap* ProfileImpl::GetExtensionInfoMap() { | 1510 ExtensionInfoMap* ProfileImpl::GetExtensionInfoMap() { |
1510 return extension_info_map_.get(); | 1511 return extension_info_map_.get(); |
1511 } | 1512 } |
1512 | 1513 |
1513 ChromeURLDataManager* ProfileImpl::GetChromeURLDataManager() { | 1514 ChromeURLDataManager* ProfileImpl::GetChromeURLDataManager() { |
1514 if (!chrome_url_data_manager_.get()) | 1515 if (!chrome_url_data_manager_.get()) |
1515 chrome_url_data_manager_.reset(new ChromeURLDataManager(this)); | 1516 chrome_url_data_manager_.reset(new ChromeURLDataManager(this)); |
1516 return chrome_url_data_manager_.get(); | 1517 return chrome_url_data_manager_.get(); |
1517 } | 1518 } |
1518 | 1519 |
| 1520 PrintPreviewDataManager* ProfileImpl::GetPrintPreviewDataManager() { |
| 1521 if (!print_preview_data_manager_.get()) |
| 1522 print_preview_data_manager_ = new PrintPreviewDataManager(); |
| 1523 return print_preview_data_manager_.get(); |
| 1524 } |
| 1525 |
1519 PromoCounter* ProfileImpl::GetInstantPromoCounter() { | 1526 PromoCounter* ProfileImpl::GetInstantPromoCounter() { |
1520 #if defined(OS_WIN) | 1527 #if defined(OS_WIN) |
1521 // TODO: enable this when we're ready to turn on the promo. | 1528 // TODO: enable this when we're ready to turn on the promo. |
1522 /* | 1529 /* |
1523 if (!checked_instant_promo_) { | 1530 if (!checked_instant_promo_) { |
1524 checked_instant_promo_ = true; | 1531 checked_instant_promo_ = true; |
1525 PrefService* prefs = GetPrefs(); | 1532 PrefService* prefs = GetPrefs(); |
1526 if (!prefs->GetBoolean(prefs::kInstantEnabledOnce) && | 1533 if (!prefs->GetBoolean(prefs::kInstantEnabledOnce) && |
1527 !InstantController::IsEnabled(this) && | 1534 !InstantController::IsEnabled(this) && |
1528 InstallUtil::IsChromeSxSProcess()) { | 1535 InstallUtil::IsChromeSxSProcess()) { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 if (!prerender::PrerenderManager::IsPrerenderingPossible()) | 1653 if (!prerender::PrerenderManager::IsPrerenderingPossible()) |
1647 return NULL; | 1654 return NULL; |
1648 if (!prerender_manager_.get()) { | 1655 if (!prerender_manager_.get()) { |
1649 CHECK(g_browser_process->prerender_tracker()); | 1656 CHECK(g_browser_process->prerender_tracker()); |
1650 prerender_manager_.reset( | 1657 prerender_manager_.reset( |
1651 new prerender::PrerenderManager( | 1658 new prerender::PrerenderManager( |
1652 this, g_browser_process->prerender_tracker())); | 1659 this, g_browser_process->prerender_tracker())); |
1653 } | 1660 } |
1654 return prerender_manager_.get(); | 1661 return prerender_manager_.get(); |
1655 } | 1662 } |
OLD | NEW |