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

Side by Side Diff: components/browser_sync/browser/profile_sync_components_factory_impl.h

Issue 1460723004: [Sync] Remove the last datatype-specific deps from sync_driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix iOS. Created 5 years 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 COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ 5 #ifndef COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__
6 #define COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ 6 #define COMPONENTS_BROWSER_SYNC_BROWSER_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"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "components/sync_driver/sync_api_component_factory.h" 14 #include "components/sync_driver/sync_api_component_factory.h"
15 #include "components/version_info/version_info.h" 15 #include "components/version_info/version_info.h"
16 #include "sync/internal_api/public/base/model_type.h" 16 #include "sync/internal_api/public/base/model_type.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 class OAuth2TokenService; 19 class OAuth2TokenService;
20 class Profile; 20 class Profile;
21 21
22 namespace autofill {
23 class AutofillWebDataService;
24 }
25
26 namespace password_manager {
27 class PasswordStore;
28 }
29
22 namespace net { 30 namespace net {
23 class URLRequestContextGetter; 31 class URLRequestContextGetter;
24 } 32 }
25 33
26 class ProfileSyncComponentsFactoryImpl 34 class ProfileSyncComponentsFactoryImpl
27 : public sync_driver::SyncApiComponentFactory { 35 : public sync_driver::SyncApiComponentFactory {
28 public: 36 public:
29 // Constructs a ProfileSyncComponentsFactoryImpl. 37 // Constructs a ProfileSyncComponentsFactoryImpl.
30 // 38 //
31 // |sync_service_url| is the base URL of the sync server. 39 // |sync_service_url| is the base URL of the sync server.
32 // 40 //
33 // |token_service| must outlive the ProfileSyncComponentsFactoryImpl. 41 // |token_service| must outlive the ProfileSyncComponentsFactoryImpl.
34 // 42 //
35 // |url_request_context_getter| must outlive the 43 // |url_request_context_getter| must outlive the
36 // ProfileSyncComponentsFactoryImpl. 44 // ProfileSyncComponentsFactoryImpl.
37 ProfileSyncComponentsFactoryImpl( 45 ProfileSyncComponentsFactoryImpl(
38 sync_driver::SyncClient* sync_client, 46 sync_driver::SyncClient* sync_client,
39 version_info::Channel channel, 47 version_info::Channel channel,
40 const std::string& version, 48 const std::string& version,
41 bool is_tablet, 49 bool is_tablet,
42 const base::CommandLine& command_line, 50 const base::CommandLine& command_line,
43 const char* history_disabled_pref, 51 const char* history_disabled_pref,
44 const GURL& sync_service_url, 52 const GURL& sync_service_url,
45 const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread, 53 const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
46 const scoped_refptr<base::SingleThreadTaskRunner>& db_thread, 54 const scoped_refptr<base::SingleThreadTaskRunner>& db_thread,
47 OAuth2TokenService* token_service, 55 OAuth2TokenService* token_service,
48 net::URLRequestContextGetter* url_request_context_getter); 56 net::URLRequestContextGetter* url_request_context_getter,
57 const scoped_refptr<autofill::AutofillWebDataService>& web_data_service,
58 const scoped_refptr<password_manager::PasswordStore>& password_store);
49 ~ProfileSyncComponentsFactoryImpl() override; 59 ~ProfileSyncComponentsFactoryImpl() override;
50 60
51 // SyncApiComponentFactory implementation: 61 // SyncApiComponentFactory implementation:
52 void RegisterDataTypes( 62 void RegisterDataTypes(
53 const RegisterDataTypesMethod& register_platform_types_method) override; 63 const RegisterDataTypesMethod& register_platform_types_method) override;
54 sync_driver::DataTypeManager* CreateDataTypeManager( 64 sync_driver::DataTypeManager* CreateDataTypeManager(
55 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 65 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
56 debug_info_listener, 66 debug_info_listener,
57 const sync_driver::DataTypeController::TypeMap* controllers, 67 const sync_driver::DataTypeController::TypeMap* controllers,
58 const sync_driver::DataTypeEncryptionHandler* encryption_handler, 68 const sync_driver::DataTypeEncryptionHandler* encryption_handler,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const std::string version_; 108 const std::string version_;
99 const bool is_tablet_; 109 const bool is_tablet_;
100 const base::CommandLine command_line_; 110 const base::CommandLine command_line_;
101 const char* history_disabled_pref_; 111 const char* history_disabled_pref_;
102 const GURL sync_service_url_; 112 const GURL sync_service_url_;
103 const scoped_refptr<base::SingleThreadTaskRunner> ui_thread_; 113 const scoped_refptr<base::SingleThreadTaskRunner> ui_thread_;
104 const scoped_refptr<base::SingleThreadTaskRunner> db_thread_; 114 const scoped_refptr<base::SingleThreadTaskRunner> db_thread_;
105 OAuth2TokenService* const token_service_; 115 OAuth2TokenService* const token_service_;
106 net::URLRequestContextGetter* const url_request_context_getter_; 116 net::URLRequestContextGetter* const url_request_context_getter_;
107 117
118 // Members that must be fetched on the UI thread but accessed on their
Nicolas Zea 2015/12/08 21:54:03 comment nit: This comment is outdated now right? T
maxbogue 2015/12/09 18:20:58 Deleted it, thanks.
119 // respective backend threads.
120 scoped_refptr<autofill::AutofillWebDataService> web_data_service_;
121 scoped_refptr<password_manager::PasswordStore> password_store_;
122
108 base::WeakPtrFactory<ProfileSyncComponentsFactoryImpl> weak_factory_; 123 base::WeakPtrFactory<ProfileSyncComponentsFactoryImpl> weak_factory_;
109 124
110 DISALLOW_COPY_AND_ASSIGN(ProfileSyncComponentsFactoryImpl); 125 DISALLOW_COPY_AND_ASSIGN(ProfileSyncComponentsFactoryImpl);
111 }; 126 };
112 127
113 #endif // COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_ H__ 128 #endif // COMPONENTS_BROWSER_SYNC_BROWSER_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_ H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698