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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 6820065: Profile shouldn't own PinnedTabService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, fix compile error Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/tabs/pinned_tab_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #include "chrome/browser/profiles/profile_manager.h" 59 #include "chrome/browser/profiles/profile_manager.h"
60 #include "chrome/browser/search_engines/template_url_fetcher.h" 60 #include "chrome/browser/search_engines/template_url_fetcher.h"
61 #include "chrome/browser/search_engines/template_url_model.h" 61 #include "chrome/browser/search_engines/template_url_model.h"
62 #include "chrome/browser/sessions/session_service.h" 62 #include "chrome/browser/sessions/session_service.h"
63 #include "chrome/browser/sessions/tab_restore_service.h" 63 #include "chrome/browser/sessions/tab_restore_service.h"
64 #include "chrome/browser/spellcheck_host.h" 64 #include "chrome/browser/spellcheck_host.h"
65 #include "chrome/browser/ssl/ssl_host_state.h" 65 #include "chrome/browser/ssl/ssl_host_state.h"
66 #include "chrome/browser/status_icons/status_tray.h" 66 #include "chrome/browser/status_icons/status_tray.h"
67 #include "chrome/browser/sync/profile_sync_factory_impl.h" 67 #include "chrome/browser/sync/profile_sync_factory_impl.h"
68 #include "chrome/browser/sync/profile_sync_service.h" 68 #include "chrome/browser/sync/profile_sync_service.h"
69 #include "chrome/browser/tabs/pinned_tab_service.h" 69 #include "chrome/browser/tabs/pinned_tab_service_factory.h"
70 #include "chrome/browser/transport_security_persister.h" 70 #include "chrome/browser/transport_security_persister.h"
71 #include "chrome/browser/ui/browser_list.h" 71 #include "chrome/browser/ui/browser_list.h"
72 #include "chrome/browser/ui/find_bar/find_bar_state.h" 72 #include "chrome/browser/ui/find_bar/find_bar_state.h"
73 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 73 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
74 #include "chrome/browser/ui/webui/extension_icon_source.h" 74 #include "chrome/browser/ui/webui/extension_icon_source.h"
75 #include "chrome/browser/ui/webui/ntp_resource_cache.h" 75 #include "chrome/browser/ui/webui/ntp_resource_cache.h"
76 #include "chrome/browser/user_style_sheet_watcher.h" 76 #include "chrome/browser/user_style_sheet_watcher.h"
77 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" 77 #include "chrome/browser/visitedlink/visitedlink_event_listener.h"
78 #include "chrome/browser/visitedlink/visitedlink_master.h" 78 #include "chrome/browser/visitedlink/visitedlink_master.h"
79 #include "chrome/browser/web_resource/promo_resource_service.h" 79 #include "chrome/browser/web_resource/promo_resource_service.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 // Listen for bookmark model load, to bootstrap the sync service. 283 // Listen for bookmark model load, to bootstrap the sync service.
284 // On CrOS sync service will be initialized after sign in. 284 // On CrOS sync service will be initialized after sign in.
285 registrar_.Add(this, NotificationType::BOOKMARK_MODEL_LOADED, 285 registrar_.Add(this, NotificationType::BOOKMARK_MODEL_LOADED,
286 Source<Profile>(this)); 286 Source<Profile>(this));
287 #endif 287 #endif
288 288
289 PrefService* local_state = g_browser_process->local_state(); 289 PrefService* local_state = g_browser_process->local_state();
290 ssl_config_service_manager_.reset( 290 ssl_config_service_manager_.reset(
291 SSLConfigServiceManager::CreateDefaultManager(GetPrefs(), local_state)); 291 SSLConfigServiceManager::CreateDefaultManager(GetPrefs(), local_state));
292 292
293 pinned_tab_service_.reset(new PinnedTabService(this)); 293 PinnedTabServiceFactory::GetForProfile(this);
294 294
295 // Initialize the BackgroundModeManager - this has to be done here before 295 // Initialize the BackgroundModeManager - this has to be done here before
296 // InitExtensions() is called because it relies on receiving notifications 296 // InitExtensions() is called because it relies on receiving notifications
297 // when extensions are loaded. BackgroundModeManager is not needed under 297 // when extensions are loaded. BackgroundModeManager is not needed under
298 // ChromeOS because Chrome is always running (no need for special keep-alive 298 // ChromeOS because Chrome is always running (no need for special keep-alive
299 // or launch-on-startup support). 299 // or launch-on-startup support).
300 #if !defined(OS_CHROMEOS) 300 #if !defined(OS_CHROMEOS)
301 background_mode_manager_.reset(new BackgroundModeManager(this, 301 background_mode_manager_.reset(new BackgroundModeManager(this,
302 CommandLine::ForCurrentProcess())); 302 CommandLine::ForCurrentProcess()));
303 #endif 303 #endif
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 return pref_proxy_config_tracker_; 1500 return pref_proxy_config_tracker_;
1501 } 1501 }
1502 1502
1503 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { 1503 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() {
1504 if (!prerender::PrerenderManager::IsPrerenderingPossible()) 1504 if (!prerender::PrerenderManager::IsPrerenderingPossible())
1505 return NULL; 1505 return NULL;
1506 if (!prerender_manager_) 1506 if (!prerender_manager_)
1507 prerender_manager_ = new prerender::PrerenderManager(this); 1507 prerender_manager_ = new prerender::PrerenderManager(this);
1508 return prerender_manager_; 1508 return prerender_manager_;
1509 } 1509 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/tabs/pinned_tab_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698