| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |