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

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

Issue 312163004: [Sync] Add support for dynamically enabling/disabling types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 | Annotate | Revision Log
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_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 538
539 // Returns whether sync is managed, i.e. controlled by configuration 539 // Returns whether sync is managed, i.e. controlled by configuration
540 // management. If so, the user is not allowed to configure sync. 540 // management. If so, the user is not allowed to configure sync.
541 virtual bool IsManaged() const; 541 virtual bool IsManaged() const;
542 542
543 // syncer::UnrecoverableErrorHandler implementation. 543 // syncer::UnrecoverableErrorHandler implementation.
544 virtual void OnUnrecoverableError( 544 virtual void OnUnrecoverableError(
545 const tracked_objects::Location& from_here, 545 const tracked_objects::Location& from_here,
546 const std::string& message) OVERRIDE; 546 const std::string& message) OVERRIDE;
547 547
548 // Called when a datatype wishes to disable itself due to having hit an 548 // Called when a datatype wishes to disable itself. Note, this does not change
549 // unrecoverable error. 549 // preferred state of a datatype and is not persisted across restarts.
550 virtual void DisableBrokenDatatype( 550 virtual void DisableDatatype(syncer::ModelType type,
551 syncer::ModelType type, 551 const tracked_objects::Location& from_here,
552 const tracked_objects::Location& from_here, 552 std::string message);
553 std::string message); 553
554 // Called to re-enable a type disabled by DisableDatatype(..). Note, this does
555 // not change the preferred state of a datatype, and is not persisted across
556 // restarts.
557 void ReenableDatatype(syncer::ModelType type);
554 558
555 // The functions below (until ActivateDataType()) should only be 559 // The functions below (until ActivateDataType()) should only be
556 // called if sync_initialized() is true. 560 // called if sync_initialized() is true.
557 561
558 // TODO(akalin): This is called mostly by ModelAssociators and 562 // TODO(akalin): This is called mostly by ModelAssociators and
559 // tests. Figure out how to pass the handle to the ModelAssociators 563 // tests. Figure out how to pass the handle to the ModelAssociators
560 // directly, figure out how to expose this to tests, and remove this 564 // directly, figure out how to expose this to tests, and remove this
561 // function. 565 // function.
562 virtual syncer::UserShare* GetUserShare() const; 566 virtual syncer::UserShare* GetUserShare() const;
563 567
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 base::Callback<void(Profile*, base::Time, base::Time)> clear_browsing_data_; 1115 base::Callback<void(Profile*, base::Time, base::Time)> clear_browsing_data_;
1112 1116
1113 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); 1117 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
1114 }; 1118 };
1115 1119
1116 bool ShouldShowActionOnUI( 1120 bool ShouldShowActionOnUI(
1117 const syncer::SyncProtocolError& error); 1121 const syncer::SyncProtocolError& error);
1118 1122
1119 1123
1120 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 1124 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698