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

Side by Side Diff: chrome/browser/sync/profile_sync_components_factory_impl.h

Issue 1314903004: Sync: Refactoring DataTypeController to make the design shareable with USS datatypes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR comments Created 5 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 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // Register data types which are enabled on desktop platforms only. 89 // Register data types which are enabled on desktop platforms only.
90 // |disabled_types| and |enabled_types| correspond only to those types 90 // |disabled_types| and |enabled_types| correspond only to those types
91 // being explicitly enabled/disabled by the command line. 91 // being explicitly enabled/disabled by the command line.
92 void RegisterDesktopDataTypes(syncer::ModelTypeSet disabled_types, 92 void RegisterDesktopDataTypes(syncer::ModelTypeSet disabled_types,
93 syncer::ModelTypeSet enabled_types); 93 syncer::ModelTypeSet enabled_types);
94 // Register data types which are enabled on both desktop and mobile. 94 // Register data types which are enabled on both desktop and mobile.
95 // |disabled_types| and |enabled_types| correspond only to those types 95 // |disabled_types| and |enabled_types| correspond only to those types
96 // being explicitly enabled/disabled by the command line. 96 // being explicitly enabled/disabled by the command line.
97 void RegisterCommonDataTypes(syncer::ModelTypeSet disabled_types, 97 void RegisterCommonDataTypes(syncer::ModelTypeSet disabled_types,
98 syncer::ModelTypeSet enabled_types); 98 syncer::ModelTypeSet enabled_types);
99 // Used to bind a callback to give to DataTypeControllers to disable 99
100 // data types.
101 sync_driver::DataTypeController::DisableTypeCallback
102 MakeDisableCallbackFor(syncer::ModelType type);
103 void DisableBrokenType(syncer::ModelType type, 100 void DisableBrokenType(syncer::ModelType type,
104 const tracked_objects::Location& from_here, 101 const tracked_objects::Location& from_here,
105 const std::string& message); 102 const std::string& message);
106 103
107 Profile* profile_; 104 Profile* profile_;
108 base::CommandLine* command_line_; 105 base::CommandLine* command_line_;
109 106
110 const GURL sync_service_url_; 107 const GURL sync_service_url_;
111 OAuth2TokenService* const token_service_; 108 OAuth2TokenService* const token_service_;
112 net::URLRequestContextGetter* const url_request_context_getter_; 109 net::URLRequestContextGetter* const url_request_context_getter_;
113 110
114 // Chrome specific implementation of SyncClient. 111 // Chrome specific implementation of SyncClient.
115 // TODO(zea): Move the creation of this into the ProfileSyncServiceFactory, 112 // TODO(zea): Move the creation of this into the ProfileSyncServiceFactory,
116 // and ownership to the ProfileSyncService itself. 113 // and ownership to the ProfileSyncService itself.
117 browser_sync::ChromeSyncClient chrome_sync_client_; 114 browser_sync::ChromeSyncClient chrome_sync_client_;
118 115
119 base::WeakPtrFactory<ProfileSyncComponentsFactoryImpl> weak_factory_; 116 base::WeakPtrFactory<ProfileSyncComponentsFactoryImpl> weak_factory_;
120 117
121 DISALLOW_COPY_AND_ASSIGN(ProfileSyncComponentsFactoryImpl); 118 DISALLOW_COPY_AND_ASSIGN(ProfileSyncComponentsFactoryImpl);
122 }; 119 };
123 120
124 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ 121 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/non_frontend_data_type_controller.cc ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698