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

Side by Side Diff: chrome/browser/history/web_history_service_factory.cc

Issue 2354613002: [Sync] Fix namespaces for the browser_sync component. (Closed)
Patch Set: Address comments. Created 4 years, 3 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/history/web_history_service_factory.h" 5 #include "chrome/browser/history/web_history_service_factory.h"
6 6
7 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 7 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
8 #include "chrome/browser/signin/signin_manager_factory.h" 8 #include "chrome/browser/signin/signin_manager_factory.h"
9 #include "chrome/browser/sync/profile_sync_service_factory.h" 9 #include "chrome/browser/sync/profile_sync_service_factory.h"
10 #include "components/browser_sync/profile_sync_service.h" 10 #include "components/browser_sync/profile_sync_service.h"
11 #include "components/history/core/browser/web_history_service.h" 11 #include "components/history/core/browser/web_history_service.h"
12 #include "components/keyed_service/content/browser_context_dependency_manager.h" 12 #include "components/keyed_service/content/browser_context_dependency_manager.h"
13 #include "components/signin/core/browser/profile_oauth2_token_service.h" 13 #include "components/signin/core/browser/profile_oauth2_token_service.h"
14 #include "components/signin/core/browser/signin_manager.h" 14 #include "components/signin/core/browser/signin_manager.h"
15 #include "net/url_request/url_request_context_getter.h" 15 #include "net/url_request/url_request_context_getter.h"
16 16
17 namespace { 17 namespace {
18 // Returns true if the user is signed in and full history sync is enabled, 18 // Returns true if the user is signed in and full history sync is enabled,
19 // and false otherwise. 19 // and false otherwise.
20 bool IsHistorySyncEnabled(Profile* profile) { 20 bool IsHistorySyncEnabled(Profile* profile) {
21 ProfileSyncService* sync = 21 browser_sync::ProfileSyncService* sync =
22 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile); 22 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile);
23 return sync && 23 return sync &&
24 sync->IsSyncActive() && 24 sync->IsSyncActive() &&
25 sync->GetActiveDataTypes().Has(syncer::HISTORY_DELETE_DIRECTIVES); 25 sync->GetActiveDataTypes().Has(syncer::HISTORY_DELETE_DIRECTIVES);
26 } 26 }
27 27
28 } // namespace 28 } // namespace
29 29
30 // static 30 // static
31 WebHistoryServiceFactory* WebHistoryServiceFactory::GetInstance() { 31 WebHistoryServiceFactory* WebHistoryServiceFactory::GetInstance() {
(...skipping 27 matching lines...) Expand all
59 WebHistoryServiceFactory::WebHistoryServiceFactory() 59 WebHistoryServiceFactory::WebHistoryServiceFactory()
60 : BrowserContextKeyedServiceFactory( 60 : BrowserContextKeyedServiceFactory(
61 "WebHistoryServiceFactory", 61 "WebHistoryServiceFactory",
62 BrowserContextDependencyManager::GetInstance()) { 62 BrowserContextDependencyManager::GetInstance()) {
63 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); 63 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
64 DependsOn(SigninManagerFactory::GetInstance()); 64 DependsOn(SigninManagerFactory::GetInstance());
65 } 65 }
66 66
67 WebHistoryServiceFactory::~WebHistoryServiceFactory() { 67 WebHistoryServiceFactory::~WebHistoryServiceFactory() {
68 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698