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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host.h

Issue 5159001: Rest of the autofill work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Couple of lint errors sneaked into my previous patch. This is clean of lint errors. Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_GLUE_SYNC_BACKEND_HOST_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/lock.h" 14 #include "base/lock.h"
15 #include "base/message_loop.h" 15 #include "base/message_loop.h"
16 #include "base/ref_counted.h" 16 #include "base/ref_counted.h"
17 #include "base/thread.h" 17 #include "base/thread.h"
18 #include "base/timer.h" 18 #include "base/timer.h"
19 #include "base/utf_string_conversions.h" 19 #include "base/utf_string_conversions.h"
20 #include "chrome/browser/sync/engine/syncapi.h" 20 #include "chrome/browser/sync/engine/syncapi.h"
21 #include "chrome/browser/sync/engine/model_safe_worker.h" 21 #include "chrome/browser/sync/engine/model_safe_worker.h"
22 #include "chrome/browser/sync/glue/data_type_controller.h" 22 #include "chrome/browser/sync/glue/data_type_controller.h"
23 #include "chrome/browser/sync/glue/ui_model_worker.h" 23 #include "chrome/browser/sync/glue/ui_model_worker.h"
24 #include "chrome/browser/sync/syncable/model_type.h" 24 #include "chrome/browser/sync/syncable/model_type.h"
25 #include "chrome/browser/sync/syncable/syncable.h"
tim (not reviewing) 2010/12/13 19:24:33 illegal include.
lipalani 2010/12/15 09:08:33 Done.
25 #include "chrome/common/net/gaia/google_service_auth_error.h" 26 #include "chrome/common/net/gaia/google_service_auth_error.h"
26 #include "chrome/common/net/url_request_context_getter.h" 27 #include "chrome/common/net/url_request_context_getter.h"
27 #include "googleurl/src/gurl.h" 28 #include "googleurl/src/gurl.h"
28 #include "jingle/notifier/base/notifier_options.h" 29 #include "jingle/notifier/base/notifier_options.h"
29 30
30 class CancelableTask; 31 class CancelableTask;
31 class Profile; 32 class Profile;
32 33
33 namespace notifier { 34 namespace notifier {
34 struct NotifierOptions; 35 struct NotifierOptions;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // See the implementation and Core::DoShutdown for details. 136 // See the implementation and Core::DoShutdown for details.
136 void Shutdown(bool sync_disabled); 137 void Shutdown(bool sync_disabled);
137 138
138 // Changes the set of data types that are currently being synced. 139 // Changes the set of data types that are currently being synced.
139 // The ready_task will be run when all of the requested data types 140 // The ready_task will be run when all of the requested data types
140 // are up-to-date and ready for activation. The task will cancelled 141 // are up-to-date and ready for activation. The task will cancelled
141 // upon shutdown. The method takes ownership of the task pointer. 142 // upon shutdown. The method takes ownership of the task pointer.
142 virtual void ConfigureDataTypes(const syncable::ModelTypeSet& types, 143 virtual void ConfigureDataTypes(const syncable::ModelTypeSet& types,
143 CancelableTask* ready_task); 144 CancelableTask* ready_task);
144 145
146 syncable::AutofillMigrationState
147 GetAutofillMigrationState();
148
149 void SetAutofillMigrationState(
150 syncable::AutofillMigrationState state);
151
152 syncable::AutofillMigrationDebugInfo
153 GetAutofillMigrationDebugInfo();
154
155 void SetAutofillMigrationDebugInfo(
156 syncable::AutofillMigrationDebugInfo::PropertyToSet property_to_set,
157 const syncable::AutofillMigrationDebugInfo& info);
158
145 // Activates change processing for the given data type. This must 159 // Activates change processing for the given data type. This must
146 // be called synchronously with the data type's model association so 160 // be called synchronously with the data type's model association so
147 // no changes are dropped between model association and change 161 // no changes are dropped between model association and change
148 // processor activation. 162 // processor activation.
149 void ActivateDataType(DataTypeController* data_type_controller, 163 void ActivateDataType(DataTypeController* data_type_controller,
150 ChangeProcessor* change_processor); 164 ChangeProcessor* change_processor);
151 165
152 // Deactivates change processing for the given data type. 166 // Deactivates change processing for the given data type.
153 void DeactivateDataType(DataTypeController* data_type_controller, 167 void DeactivateDataType(DataTypeController* data_type_controller,
154 ChangeProcessor* change_processor); 168 ChangeProcessor* change_processor);
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 void PersistEncryptionBootstrapToken(const std::string& token); 452 void PersistEncryptionBootstrapToken(const std::string& token);
439 std::string RestoreEncryptionBootstrapToken(); 453 std::string RestoreEncryptionBootstrapToken();
440 454
441 // Our core, which communicates directly to the syncapi. 455 // Our core, which communicates directly to the syncapi.
442 scoped_refptr<Core> core_; 456 scoped_refptr<Core> core_;
443 457
444 private: 458 private:
445 459
446 UIModelWorker* ui_worker(); 460 UIModelWorker* ui_worker();
447 461
462 void SyncBackendHost::ConfigureAutofillMigration();
tim (not reviewing) 2010/12/13 19:24:33 I think you can remove the 'SyncBackendHost::'
lipalani 2010/12/14 21:05:57 Done.
463
448 // A thread we dedicate for use by our Core to perform initialization, 464 // A thread we dedicate for use by our Core to perform initialization,
449 // authentication, handle messages from the syncapi, and periodically tell 465 // authentication, handle messages from the syncapi, and periodically tell
450 // the syncapi to persist itself. 466 // the syncapi to persist itself.
451 base::Thread core_thread_; 467 base::Thread core_thread_;
452 468
453 // A reference to the MessageLoop used to construct |this|, so we know how 469 // A reference to the MessageLoop used to construct |this|, so we know how
454 // to safely talk back to the SyncFrontend. 470 // to safely talk back to the SyncFrontend.
455 MessageLoop* const frontend_loop_; 471 MessageLoop* const frontend_loop_;
456 472
457 Profile* profile_; 473 Profile* profile_;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 526
511 // Whether we've processed the initialization complete callback. 527 // Whether we've processed the initialization complete callback.
512 bool syncapi_initialized_; 528 bool syncapi_initialized_;
513 529
514 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); 530 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost);
515 }; 531 };
516 532
517 } // namespace browser_sync 533 } // namespace browser_sync
518 534
519 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 535 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698