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

Side by Side Diff: chrome/browser/sync/sessions/sync_session.cc

Issue 8919021: [Sync] Rename ModelEnumSet to ModelTypeSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/sync/sessions/sync_session.h" 5 #include "chrome/browser/sync/sessions/sync_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/sync/syncable/directory_manager.h" 10 #include "chrome/browser/sync/syncable/directory_manager.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 status_controller_.reset(new StatusController(routing_info_)); 129 status_controller_.reset(new StatusController(routing_info_));
130 } 130 }
131 131
132 SyncSessionSnapshot SyncSession::TakeSnapshot() const { 132 SyncSessionSnapshot SyncSession::TakeSnapshot() const {
133 syncable::ScopedDirLookup dir(context_->directory_manager(), 133 syncable::ScopedDirLookup dir(context_->directory_manager(),
134 context_->account_name()); 134 context_->account_name());
135 if (!dir.good()) 135 if (!dir.good())
136 LOG(ERROR) << "Scoped dir lookup failed!"; 136 LOG(ERROR) << "Scoped dir lookup failed!";
137 137
138 bool is_share_useable = true; 138 bool is_share_useable = true;
139 syncable::ModelEnumSet initial_sync_ended; 139 syncable::ModelTypeSet initial_sync_ended;
140 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; 140 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT];
141 for (int i = syncable::FIRST_REAL_MODEL_TYPE; 141 for (int i = syncable::FIRST_REAL_MODEL_TYPE;
142 i < syncable::MODEL_TYPE_COUNT; ++i) { 142 i < syncable::MODEL_TYPE_COUNT; ++i) {
143 syncable::ModelType type(syncable::ModelTypeFromInt(i)); 143 syncable::ModelType type(syncable::ModelTypeFromInt(i));
144 if (routing_info_.count(type) != 0) { 144 if (routing_info_.count(type) != 0) {
145 if (dir->initial_sync_ended_for_type(type)) 145 if (dir->initial_sync_ended_for_type(type))
146 initial_sync_ended.Put(type); 146 initial_sync_ended.Put(type);
147 else 147 else
148 is_share_useable = false; 148 is_share_useable = false;
149 } 149 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 enabled_groups_with_verified_updates.insert(*it); 220 enabled_groups_with_verified_updates.insert(*it);
221 } 221 }
222 } 222 }
223 223
224 return enabled_groups_with_verified_updates; 224 return enabled_groups_with_verified_updates;
225 } 225 }
226 226
227 227
228 } // namespace sessions 228 } // namespace sessions
229 } // namespace browser_sync 229 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/sessions/status_controller.cc ('k') | chrome/browser/sync/sessions/sync_session_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698