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

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

Issue 2216713002: Use BookmarkModelFactory::GetForBrowserContext everywhere (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarks
Patch Set: Replace in .mm files Created 4 years, 4 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 { 653 {
654 SCOPED_UMA_HISTOGRAM_TIMER("Profile.NotifyProfileCreatedTime"); 654 SCOPED_UMA_HISTOGRAM_TIMER("Profile.NotifyProfileCreatedTime");
655 content::NotificationService::current()->Notify( 655 content::NotificationService::current()->Notify(
656 chrome::NOTIFICATION_PROFILE_CREATED, 656 chrome::NOTIFICATION_PROFILE_CREATED,
657 content::Source<Profile>(this), 657 content::Source<Profile>(this),
658 content::NotificationService::NoDetails()); 658 content::NotificationService::NoDetails());
659 } 659 }
660 #if !defined(OS_CHROMEOS) 660 #if !defined(OS_CHROMEOS)
661 // Listen for bookmark model load, to bootstrap the sync service. 661 // Listen for bookmark model load, to bootstrap the sync service.
662 // On CrOS sync service will be initialized after sign in. 662 // On CrOS sync service will be initialized after sign in.
663 BookmarkModel* model = BookmarkModelFactory::GetForProfile(this); 663 BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(this);
664 model->AddObserver(new BookmarkModelLoadedObserver(this)); 664 model->AddObserver(new BookmarkModelLoadedObserver(this));
665 #endif 665 #endif
666 666
667 PushMessagingServiceImpl::InitializeForProfile(this); 667 PushMessagingServiceImpl::InitializeForProfile(this);
668 668
669 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 669 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
670 signin_ui_util::InitializePrefsForProfile(this); 670 signin_ui_util::InitializePrefsForProfile(this);
671 #endif 671 #endif
672 } 672 }
673 673
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { 1278 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) {
1279 domain_reliability::DomainReliabilityService* service = 1279 domain_reliability::DomainReliabilityService* service =
1280 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1280 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1281 GetForBrowserContext(this); 1281 GetForBrowserContext(this);
1282 if (!service) 1282 if (!service)
1283 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); 1283 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>();
1284 1284
1285 return service->CreateMonitor( 1285 return service->CreateMonitor(
1286 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 1286 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
1287 } 1287 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698