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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 #include "chrome/browser/status_icons/status_tray.h" | 75 #include "chrome/browser/status_icons/status_tray.h" |
76 #include "chrome/browser/sync/profile_sync_factory_impl.h" | 76 #include "chrome/browser/sync/profile_sync_factory_impl.h" |
77 #include "chrome/browser/sync/profile_sync_service.h" | 77 #include "chrome/browser/sync/profile_sync_service.h" |
78 #include "chrome/browser/tabs/pinned_tab_service.h" | 78 #include "chrome/browser/tabs/pinned_tab_service.h" |
79 #include "chrome/browser/themes/browser_theme_provider.h" | 79 #include "chrome/browser/themes/browser_theme_provider.h" |
80 #include "chrome/browser/transport_security_persister.h" | 80 #include "chrome/browser/transport_security_persister.h" |
81 #include "chrome/browser/ui/find_bar/find_bar_state.h" | 81 #include "chrome/browser/ui/find_bar/find_bar_state.h" |
82 #include "chrome/browser/user_style_sheet_watcher.h" | 82 #include "chrome/browser/user_style_sheet_watcher.h" |
83 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" | 83 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" |
84 #include "chrome/browser/visitedlink/visitedlink_master.h" | 84 #include "chrome/browser/visitedlink/visitedlink_master.h" |
85 #include "chrome/browser/web_resource/web_resource_service.h" | 85 #include "chrome/browser/web_resource/promo_resource_service.h" |
86 #include "chrome/browser/webdata/web_data_service.h" | 86 #include "chrome/browser/webdata/web_data_service.h" |
87 #include "chrome/common/chrome_constants.h" | 87 #include "chrome/common/chrome_constants.h" |
88 #include "chrome/common/chrome_paths.h" | 88 #include "chrome/common/chrome_paths.h" |
89 #include "chrome/common/chrome_paths_internal.h" | 89 #include "chrome/common/chrome_paths_internal.h" |
90 #include "chrome/common/chrome_switches.h" | 90 #include "chrome/common/chrome_switches.h" |
91 #include "chrome/common/json_pref_store.h" | 91 #include "chrome/common/json_pref_store.h" |
92 #include "chrome/common/notification_service.h" | 92 #include "chrome/common/notification_service.h" |
93 #include "chrome/common/pref_names.h" | 93 #include "chrome/common/pref_names.h" |
94 #include "chrome/common/render_messages.h" | 94 #include "chrome/common/render_messages.h" |
95 #include "grit/browser_resources.h" | 95 #include "grit/browser_resources.h" |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 if (!default_apps->ShouldInstallDefaultApps(extension_service->GetAppIds())) | 478 if (!default_apps->ShouldInstallDefaultApps(extension_service->GetAppIds())) |
479 return; | 479 return; |
480 | 480 |
481 const ExtensionIdSet& app_ids = default_apps->default_apps(); | 481 const ExtensionIdSet& app_ids = default_apps->default_apps(); |
482 for (ExtensionIdSet::const_iterator iter = app_ids.begin(); | 482 for (ExtensionIdSet::const_iterator iter = app_ids.begin(); |
483 iter != app_ids.end(); ++iter) { | 483 iter != app_ids.end(); ++iter) { |
484 extension_service->AddPendingExtensionFromDefaultAppList(*iter); | 484 extension_service->AddPendingExtensionFromDefaultAppList(*iter); |
485 } | 485 } |
486 } | 486 } |
487 | 487 |
488 void ProfileImpl::InitWebResources() { | 488 void ProfileImpl::InitPromoResources() { |
489 if (web_resource_service_) | 489 if (promo_resource_service_) |
490 return; | 490 return; |
491 | 491 |
492 web_resource_service_ = new WebResourceService(this); | 492 promo_resource_service_ = new PromoResourceService(this); |
493 web_resource_service_->StartAfterDelay(); | 493 promo_resource_service_->StartAfterDelay(); |
494 } | 494 } |
495 | 495 |
496 NTPResourceCache* ProfileImpl::GetNTPResourceCache() { | 496 NTPResourceCache* ProfileImpl::GetNTPResourceCache() { |
497 if (!ntp_resource_cache_.get()) | 497 if (!ntp_resource_cache_.get()) |
498 ntp_resource_cache_.reset(new NTPResourceCache(this)); | 498 ntp_resource_cache_.reset(new NTPResourceCache(this)); |
499 return ntp_resource_cache_.get(); | 499 return ntp_resource_cache_.get(); |
500 } | 500 } |
501 | 501 |
502 FilePath ProfileImpl::last_selected_directory() { | 502 FilePath ProfileImpl::last_selected_directory() { |
503 return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); | 503 return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1504 } | 1504 } |
1505 | 1505 |
1506 PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1506 PrerenderManager* ProfileImpl::GetPrerenderManager() { |
1507 CommandLine* cl = CommandLine::ForCurrentProcess(); | 1507 CommandLine* cl = CommandLine::ForCurrentProcess(); |
1508 if (!cl->HasSwitch(switches::kEnablePagePrerender)) | 1508 if (!cl->HasSwitch(switches::kEnablePagePrerender)) |
1509 return NULL; | 1509 return NULL; |
1510 if (!prerender_manager_) | 1510 if (!prerender_manager_) |
1511 prerender_manager_ = new PrerenderManager(this); | 1511 prerender_manager_ = new PrerenderManager(this); |
1512 return prerender_manager_; | 1512 return prerender_manager_; |
1513 } | 1513 } |
OLD | NEW |