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

Unified Diff: components/sync/engine/cycle/sync_cycle_snapshot.cc

Issue 2258873003: [Sync] Move sessions/ to engine/cycle/ and rename things to match. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/engine/cycle/sync_cycle_snapshot.cc
diff --git a/components/sync/sessions/sync_session_snapshot.cc b/components/sync/engine/cycle/sync_cycle_snapshot.cc
similarity index 79%
rename from components/sync/sessions/sync_session_snapshot.cc
rename to components/sync/engine/cycle/sync_cycle_snapshot.cc
index 443af0666b1960bf9fafe876efc65aa04e73681f..7b58a91a7c26286105ec97208c81b9c30f8fd09a 100644
--- a/components/sync/sessions/sync_session_snapshot.cc
+++ b/components/sync/engine/cycle/sync_cycle_snapshot.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/sync/sessions/sync_session_snapshot.h"
+#include "components/sync/engine/cycle/sync_cycle_snapshot.h"
#include <stddef.h>
@@ -14,9 +14,8 @@
#include "components/sync/protocol/proto_enum_conversions.h"
namespace syncer {
-namespace sessions {
-SyncSessionSnapshot::SyncSessionSnapshot()
+SyncCycleSnapshot::SyncCycleSnapshot()
: is_silenced_(false),
num_encryption_conflicts_(0),
num_hierarchy_conflicts_(0),
@@ -27,7 +26,7 @@ SyncSessionSnapshot::SyncSessionSnapshot()
num_to_delete_entries_by_type_(MODEL_TYPE_COUNT, 0),
is_initialized_(false) {}
-SyncSessionSnapshot::SyncSessionSnapshot(
+SyncCycleSnapshot::SyncCycleSnapshot(
const ModelNeutralState& model_neutral_state,
const ProgressMarkerMap& download_progress_markers,
bool is_silenced,
@@ -56,12 +55,11 @@ SyncSessionSnapshot::SyncSessionSnapshot(
legacy_updates_source_(legacy_updates_source),
is_initialized_(true) {}
-SyncSessionSnapshot::SyncSessionSnapshot(const SyncSessionSnapshot& other) =
- default;
+SyncCycleSnapshot::SyncCycleSnapshot(const SyncCycleSnapshot& other) = default;
-SyncSessionSnapshot::~SyncSessionSnapshot() {}
+SyncCycleSnapshot::~SyncCycleSnapshot() {}
-std::unique_ptr<base::DictionaryValue> SyncSessionSnapshot::ToValue() const {
+std::unique_ptr<base::DictionaryValue> SyncCycleSnapshot::ToValue() const {
std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
value->SetInteger("numSuccessfulCommits",
model_neutral_state_.num_successful_commits);
@@ -107,67 +105,65 @@ std::unique_ptr<base::DictionaryValue> SyncSessionSnapshot::ToValue() const {
return value;
}
-std::string SyncSessionSnapshot::ToString() const {
+std::string SyncCycleSnapshot::ToString() const {
std::string json;
base::JSONWriter::WriteWithOptions(
*ToValue(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &json);
return json;
}
-const ProgressMarkerMap& SyncSessionSnapshot::download_progress_markers()
- const {
+const ProgressMarkerMap& SyncCycleSnapshot::download_progress_markers() const {
return download_progress_markers_;
}
-bool SyncSessionSnapshot::is_silenced() const {
+bool SyncCycleSnapshot::is_silenced() const {
return is_silenced_;
}
-int SyncSessionSnapshot::num_encryption_conflicts() const {
+int SyncCycleSnapshot::num_encryption_conflicts() const {
return num_encryption_conflicts_;
}
-int SyncSessionSnapshot::num_hierarchy_conflicts() const {
+int SyncCycleSnapshot::num_hierarchy_conflicts() const {
return num_hierarchy_conflicts_;
}
-int SyncSessionSnapshot::num_server_conflicts() const {
+int SyncCycleSnapshot::num_server_conflicts() const {
return num_server_conflicts_;
}
-bool SyncSessionSnapshot::notifications_enabled() const {
+bool SyncCycleSnapshot::notifications_enabled() const {
return notifications_enabled_;
}
-size_t SyncSessionSnapshot::num_entries() const {
+size_t SyncCycleSnapshot::num_entries() const {
return num_entries_;
}
-base::Time SyncSessionSnapshot::sync_start_time() const {
+base::Time SyncCycleSnapshot::sync_start_time() const {
return sync_start_time_;
}
-base::Time SyncSessionSnapshot::poll_finish_time() const {
+base::Time SyncCycleSnapshot::poll_finish_time() const {
return poll_finish_time_;
}
-bool SyncSessionSnapshot::is_initialized() const {
+bool SyncCycleSnapshot::is_initialized() const {
return is_initialized_;
}
-const std::vector<int>& SyncSessionSnapshot::num_entries_by_type() const {
+const std::vector<int>& SyncCycleSnapshot::num_entries_by_type() const {
return num_entries_by_type_;
}
-const std::vector<int>& SyncSessionSnapshot::num_to_delete_entries_by_type()
+const std::vector<int>& SyncCycleSnapshot::num_to_delete_entries_by_type()
const {
return num_to_delete_entries_by_type_;
}
sync_pb::GetUpdatesCallerInfo::GetUpdatesSource
-SyncSessionSnapshot::legacy_updates_source() const {
+SyncCycleSnapshot::legacy_updates_source() const {
return legacy_updates_source_;
}
-} // namespace sessions
} // namespace syncer
« no previous file with comments | « components/sync/engine/cycle/sync_cycle_snapshot.h ('k') | components/sync/engine/cycle/sync_cycle_snapshot_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698