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

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

Issue 324913004: Skeleton GCMAppHandler for Push API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 6 years, 6 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
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/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" 64 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h"
65 #include "chrome/browser/profiles/chrome_version_service.h" 65 #include "chrome/browser/profiles/chrome_version_service.h"
66 #include "chrome/browser/profiles/gaia_info_update_service_factory.h" 66 #include "chrome/browser/profiles/gaia_info_update_service_factory.h"
67 #include "chrome/browser/profiles/profile_destroyer.h" 67 #include "chrome/browser/profiles/profile_destroyer.h"
68 #include "chrome/browser/profiles/profile_info_cache.h" 68 #include "chrome/browser/profiles/profile_info_cache.h"
69 #include "chrome/browser/profiles/profile_manager.h" 69 #include "chrome/browser/profiles/profile_manager.h"
70 #include "chrome/browser/profiles/profile_metrics.h" 70 #include "chrome/browser/profiles/profile_metrics.h"
71 #include "chrome/browser/search_engines/template_url_fetcher.h" 71 #include "chrome/browser/search_engines/template_url_fetcher.h"
72 #include "chrome/browser/services/gcm/gcm_profile_service.h" 72 #include "chrome/browser/services/gcm/gcm_profile_service.h"
73 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" 73 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
74 #include "chrome/browser/services/gcm/push_messaging_service_impl.h"
74 #include "chrome/browser/sessions/session_service_factory.h" 75 #include "chrome/browser/sessions/session_service_factory.h"
75 #include "chrome/browser/ui/startup/startup_browser_creator.h" 76 #include "chrome/browser/ui/startup/startup_browser_creator.h"
76 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" 77 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
77 #include "chrome/browser/webdata/web_data_service.h" 78 #include "chrome/browser/webdata/web_data_service.h"
78 #include "chrome/common/chrome_constants.h" 79 #include "chrome/common/chrome_constants.h"
79 #include "chrome/common/chrome_paths_internal.h" 80 #include "chrome/common/chrome_paths_internal.h"
80 #include "chrome/common/chrome_switches.h" 81 #include "chrome/common/chrome_switches.h"
81 #include "chrome/common/chrome_version_info.h" 82 #include "chrome/common/chrome_version_info.h"
82 #include "chrome/common/pref_names.h" 83 #include "chrome/common/pref_names.h"
83 #include "chrome/common/url_constants.h" 84 #include "chrome/common/url_constants.h"
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 chrome::NOTIFICATION_PROFILE_CREATED, 648 chrome::NOTIFICATION_PROFILE_CREATED,
648 content::Source<Profile>(this), 649 content::Source<Profile>(this),
649 content::NotificationService::NoDetails()); 650 content::NotificationService::NoDetails());
650 651
651 #if !defined(OS_CHROMEOS) 652 #if !defined(OS_CHROMEOS)
652 // Listen for bookmark model load, to bootstrap the sync service. 653 // Listen for bookmark model load, to bootstrap the sync service.
653 // On CrOS sync service will be initialized after sign in. 654 // On CrOS sync service will be initialized after sign in.
654 BookmarkModel* model = BookmarkModelFactory::GetForProfile(this); 655 BookmarkModel* model = BookmarkModelFactory::GetForProfile(this);
655 model->AddObserver(new BookmarkModelLoadedObserver(this)); 656 model->AddObserver(new BookmarkModelLoadedObserver(this));
656 #endif 657 #endif
658
659 gcm::PushMessagingServiceImpl::InitializeForProfile(this);
657 } 660 }
658 661
659 void ProfileImpl::InitHostZoomMap() { 662 void ProfileImpl::InitHostZoomMap() {
660 HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this); 663 HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this);
661 host_zoom_map->SetDefaultZoomLevel( 664 host_zoom_map->SetDefaultZoomLevel(
662 prefs_->GetDouble(prefs::kDefaultZoomLevel)); 665 prefs_->GetDouble(prefs::kDefaultZoomLevel));
663 666
664 const base::DictionaryValue* host_zoom_dictionary = 667 const base::DictionaryValue* host_zoom_dictionary =
665 prefs_->GetDictionary(prefs::kPerHostZoomLevels); 668 prefs_->GetDictionary(prefs::kPerHostZoomLevels);
666 // Careful: The returned value could be NULL if the pref has never been set. 669 // Careful: The returned value could be NULL if the pref has never been set.
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { 1377 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() {
1375 #if defined(OS_CHROMEOS) 1378 #if defined(OS_CHROMEOS)
1376 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 1379 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
1377 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 1380 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
1378 g_browser_process->local_state()); 1381 g_browser_process->local_state());
1379 } 1382 }
1380 #endif // defined(OS_CHROMEOS) 1383 #endif // defined(OS_CHROMEOS)
1381 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 1384 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
1382 GetPrefs(), g_browser_process->local_state()); 1385 GetPrefs(), g_browser_process->local_state());
1383 } 1386 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698