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

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

Issue 10387144: [Sync] - Implement isolated model association. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For submitting. Created 8 years, 7 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_GLUE_DATA_TYPE_MANAGER_H__ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_H__
6 #define CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_H__ 6 #define CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_H__
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 typedef syncable::ModelTypeSet TypeSet; 53 typedef syncable::ModelTypeSet TypeSet;
54 54
55 // Note: |errors| is only filled when status is not OK. 55 // Note: |errors| is only filled when status is not OK.
56 struct ConfigureResult { 56 struct ConfigureResult {
57 ConfigureResult(); 57 ConfigureResult();
58 ConfigureResult(ConfigureStatus status, 58 ConfigureResult(ConfigureStatus status,
59 TypeSet requested_types); 59 TypeSet requested_types);
60 ConfigureResult(ConfigureStatus status, 60 ConfigureResult(ConfigureStatus status,
61 TypeSet requested_types, 61 TypeSet requested_types,
62 const std::list<SyncError>& errors); 62 const std::list<SyncError>& failed_data_types,
63 syncable::ModelTypeSet waiting_to_start);
63 ~ConfigureResult(); 64 ~ConfigureResult();
64 ConfigureStatus status; 65 ConfigureStatus status;
65 TypeSet requested_types; 66 TypeSet requested_types;
66 std::list<SyncError> errors; 67
68 // These types encountered a failure in association.
69 std::list<SyncError> failed_data_types;
70
71 // List of types that failed to start association with in our alloted
72 // time period(see kDataTypeLoadWaitTimeInSeconds). We move
73 // forward here and allow these types to continue loading in the
74 // background. When these types are loaded DataTypeManager will
75 // be informed and another configured cycle will be started.
76 syncable::ModelTypeSet waiting_to_start;
67 }; 77 };
68 78
69 virtual ~DataTypeManager() {} 79 virtual ~DataTypeManager() {}
70 80
71 // Convert a ConfigureStatus to string for debug purposes. 81 // Convert a ConfigureStatus to string for debug purposes.
72 static std::string ConfigureStatusToString(ConfigureStatus status); 82 static std::string ConfigureStatusToString(ConfigureStatus status);
73 83
74 // Begins asynchronous configuration of data types. Any currently 84 // Begins asynchronous configuration of data types. Any currently
75 // running data types that are not in the desired_types set will be 85 // running data types that are not in the desired_types set will be
76 // stopped. Any stopped data types that are in the desired_types 86 // stopped. Any stopped data types that are in the desired_types
(...skipping 18 matching lines...) Expand all
95 // stopped. 105 // stopped.
96 virtual void Stop() = 0; 106 virtual void Stop() = 0;
97 107
98 // The current state of the data type manager. 108 // The current state of the data type manager.
99 virtual State state() const = 0; 109 virtual State state() const = 0;
100 }; 110 };
101 111
102 } // namespace browser_sync 112 } // namespace browser_sync
103 113
104 #endif // CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_H__ 114 #endif // CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_H__
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc ('k') | chrome/browser/sync/glue/data_type_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698