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

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

Issue 338363003: Push API: register PushMessagingServiceImpl as GCMAppHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Address review issues. 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "chrome/browser/profiles/chrome_version_service.h" 61 #include "chrome/browser/profiles/chrome_version_service.h"
62 #include "chrome/browser/profiles/gaia_info_update_service_factory.h" 62 #include "chrome/browser/profiles/gaia_info_update_service_factory.h"
63 #include "chrome/browser/profiles/profile_destroyer.h" 63 #include "chrome/browser/profiles/profile_destroyer.h"
64 #include "chrome/browser/profiles/profile_info_cache.h" 64 #include "chrome/browser/profiles/profile_info_cache.h"
65 #include "chrome/browser/profiles/profile_manager.h" 65 #include "chrome/browser/profiles/profile_manager.h"
66 #include "chrome/browser/profiles/profile_metrics.h" 66 #include "chrome/browser/profiles/profile_metrics.h"
67 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 67 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
68 #include "chrome/browser/search_engines/template_url_fetcher.h" 68 #include "chrome/browser/search_engines/template_url_fetcher.h"
69 #include "chrome/browser/services/gcm/gcm_profile_service.h" 69 #include "chrome/browser/services/gcm/gcm_profile_service.h"
70 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" 70 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
71 #include "chrome/browser/services/gcm/push_messaging_service_impl.h"
71 #include "chrome/browser/sessions/session_service_factory.h" 72 #include "chrome/browser/sessions/session_service_factory.h"
72 #include "chrome/browser/ui/startup/startup_browser_creator.h" 73 #include "chrome/browser/ui/startup/startup_browser_creator.h"
73 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" 74 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
74 #include "chrome/browser/webdata/web_data_service.h" 75 #include "chrome/browser/webdata/web_data_service.h"
75 #include "chrome/common/chrome_constants.h" 76 #include "chrome/common/chrome_constants.h"
76 #include "chrome/common/chrome_paths_internal.h" 77 #include "chrome/common/chrome_paths_internal.h"
77 #include "chrome/common/chrome_switches.h" 78 #include "chrome/common/chrome_switches.h"
78 #include "chrome/common/chrome_version_info.h" 79 #include "chrome/common/chrome_version_info.h"
79 #include "chrome/common/pref_names.h" 80 #include "chrome/common/pref_names.h"
80 #include "chrome/common/url_constants.h" 81 #include "chrome/common/url_constants.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 chrome::NOTIFICATION_PROFILE_CREATED, 637 chrome::NOTIFICATION_PROFILE_CREATED,
637 content::Source<Profile>(this), 638 content::Source<Profile>(this),
638 content::NotificationService::NoDetails()); 639 content::NotificationService::NoDetails());
639 640
640 #if !defined(OS_CHROMEOS) 641 #if !defined(OS_CHROMEOS)
641 // Listen for bookmark model load, to bootstrap the sync service. 642 // Listen for bookmark model load, to bootstrap the sync service.
642 // On CrOS sync service will be initialized after sign in. 643 // On CrOS sync service will be initialized after sign in.
643 BookmarkModel* model = BookmarkModelFactory::GetForProfile(this); 644 BookmarkModel* model = BookmarkModelFactory::GetForProfile(this);
644 model->AddObserver(new BookmarkModelLoadedObserver(this)); 645 model->AddObserver(new BookmarkModelLoadedObserver(this));
645 #endif 646 #endif
647
648 gcm::PushMessagingServiceImpl::InitializeForProfile(this);
646 } 649 }
647 650
648 void ProfileImpl::InitHostZoomMap() { 651 void ProfileImpl::InitHostZoomMap() {
649 HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this); 652 HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this);
650 host_zoom_map->SetDefaultZoomLevel( 653 host_zoom_map->SetDefaultZoomLevel(
651 prefs_->GetDouble(prefs::kDefaultZoomLevel)); 654 prefs_->GetDouble(prefs::kDefaultZoomLevel));
652 655
653 const base::DictionaryValue* host_zoom_dictionary = 656 const base::DictionaryValue* host_zoom_dictionary =
654 prefs_->GetDictionary(prefs::kPerHostZoomLevels); 657 prefs_->GetDictionary(prefs::kPerHostZoomLevels);
655 // Careful: The returned value could be NULL if the pref has never been set. 658 // Careful: The returned value could be NULL if the pref has never been set.
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { 1308 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() {
1306 #if defined(OS_CHROMEOS) 1309 #if defined(OS_CHROMEOS)
1307 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 1310 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
1308 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 1311 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
1309 g_browser_process->local_state()); 1312 g_browser_process->local_state());
1310 } 1313 }
1311 #endif // defined(OS_CHROMEOS) 1314 #endif // defined(OS_CHROMEOS)
1312 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 1315 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
1313 GetPrefs(), g_browser_process->local_state()); 1316 GetPrefs(), g_browser_process->local_state());
1314 } 1317 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/services/gcm/gcm_profile_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698