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

Side by Side Diff: components/sync/driver/model_association_manager.cc

Issue 2701003002: [Sync] Clean up ModelType code. (Closed)
Patch Set: Switched int to size_t to fix compile. Created 3 years, 10 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
« no previous file with comments | « components/sync/base/sync_prefs.cc ('k') | components/sync/driver/user_selectable_sync_type.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "components/sync/driver/model_association_manager.h" 5 #include "components/sync/driver/model_association_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 30 matching lines...) Expand all
41 // so we want to do it early. 41 // so we want to do it early.
42 PREFERENCES, PRIORITY_PREFERENCES, EXTENSIONS, APPS, APP_LIST, ARC_PACKAGE, 42 PREFERENCES, PRIORITY_PREFERENCES, EXTENSIONS, APPS, APP_LIST, ARC_PACKAGE,
43 READING_LIST, THEMES, SEARCH_ENGINES, SESSIONS, APP_NOTIFICATIONS, 43 READING_LIST, THEMES, SEARCH_ENGINES, SESSIONS, APP_NOTIFICATIONS,
44 DICTIONARY, FAVICON_IMAGES, FAVICON_TRACKING, PRINTERS, 44 DICTIONARY, FAVICON_IMAGES, FAVICON_TRACKING, PRINTERS,
45 SUPERVISED_USER_SETTINGS, SUPERVISED_USER_SHARED_SETTINGS, 45 SUPERVISED_USER_SETTINGS, SUPERVISED_USER_SHARED_SETTINGS,
46 SUPERVISED_USER_WHITELISTS, ARTICLES, WIFI_CREDENTIALS, 46 SUPERVISED_USER_WHITELISTS, ARTICLES, WIFI_CREDENTIALS,
47 }; 47 };
48 48
49 static_assert(arraysize(kStartOrder) == 49 static_assert(arraysize(kStartOrder) ==
50 MODEL_TYPE_COUNT - FIRST_REAL_MODEL_TYPE, 50 MODEL_TYPE_COUNT - FIRST_REAL_MODEL_TYPE,
51 "kStartOrder must have MODEL_TYPE_COUNT - " 51 "When adding a new type, update kStartOrder.");
52 "FIRST_REAL_MODEL_TYPE elements");
53 52
54 // The amount of time we wait for association to finish. If some types haven't 53 // The amount of time we wait for association to finish. If some types haven't
55 // finished association by the time, DataTypeManager is notified of the 54 // finished association by the time, DataTypeManager is notified of the
56 // unfinished types. 55 // unfinished types.
57 const int64_t kAssociationTimeOutInSeconds = 600; 56 const int64_t kAssociationTimeOutInSeconds = 600;
58 57
59 DataTypeAssociationStats BuildAssociationStatsFromMergeResults( 58 DataTypeAssociationStats BuildAssociationStatsFromMergeResults(
60 const SyncMergeResult& local_merge_result, 59 const SyncMergeResult& local_merge_result,
61 const SyncMergeResult& syncer_merge_result, 60 const SyncMergeResult& syncer_merge_result,
62 const base::TimeDelta& association_wait_time, 61 const base::TimeDelta& association_wait_time,
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 // At least one type is not ready. 418 // At least one type is not ready.
420 return; 419 return;
421 } 420 }
422 } 421 }
423 422
424 notified_about_ready_for_configure_ = true; 423 notified_about_ready_for_configure_ = true;
425 delegate_->OnAllDataTypesReadyForConfigure(); 424 delegate_->OnAllDataTypesReadyForConfigure();
426 } 425 }
427 426
428 } // namespace syncer 427 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/base/sync_prefs.cc ('k') | components/sync/driver/user_selectable_sync_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698