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

Unified Diff: components/sync/sessions/sync_session_snapshot.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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/sessions/sync_session_snapshot.cc
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/components/sync/sessions/sync_session_snapshot.cc
similarity index 83%
rename from sync/internal_api/public/sessions/sync_session_snapshot.cc
rename to components/sync/sessions/sync_session_snapshot.cc
index c88711a413d61a5dd4a705797f408659a2d8e39e..443af0666b1960bf9fafe876efc65aa04e73681f 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.cc
+++ b/components/sync/sessions/sync_session_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 "sync/internal_api/public/sessions/sync_session_snapshot.h"
+#include "components/sync/sessions/sync_session_snapshot.h"
#include <stddef.h>
@@ -11,7 +11,7 @@
#include "base/json/json_writer.h"
#include "base/values.h"
-#include "sync/protocol/proto_enum_conversions.h"
+#include "components/sync/protocol/proto_enum_conversions.h"
namespace syncer {
namespace sessions {
@@ -25,8 +25,7 @@ SyncSessionSnapshot::SyncSessionSnapshot()
num_entries_(0),
num_entries_by_type_(MODEL_TYPE_COUNT, 0),
num_to_delete_entries_by_type_(MODEL_TYPE_COUNT, 0),
- is_initialized_(false) {
-}
+ is_initialized_(false) {}
SyncSessionSnapshot::SyncSessionSnapshot(
const ModelNeutralState& model_neutral_state,
@@ -55,8 +54,7 @@ SyncSessionSnapshot::SyncSessionSnapshot(
num_entries_by_type_(num_entries_by_type),
num_to_delete_entries_by_type_(num_to_delete_entries_by_type),
legacy_updates_source_(legacy_updates_source),
- is_initialized_(true) {
-}
+ is_initialized_(true) {}
SyncSessionSnapshot::SyncSessionSnapshot(const SyncSessionSnapshot& other) =
default;
@@ -68,13 +66,15 @@ std::unique_ptr<base::DictionaryValue> SyncSessionSnapshot::ToValue() const {
value->SetInteger("numSuccessfulCommits",
model_neutral_state_.num_successful_commits);
value->SetInteger("numSuccessfulBookmarkCommits",
- model_neutral_state_.num_successful_bookmark_commits);
+ model_neutral_state_.num_successful_bookmark_commits);
value->SetInteger("numUpdatesDownloadedTotal",
- model_neutral_state_.num_updates_downloaded_total);
- value->SetInteger("numTombstoneUpdatesDownloadedTotal",
- model_neutral_state_.num_tombstone_updates_downloaded_total);
- value->SetInteger("numReflectedUpdatesDownloadedTotal",
- model_neutral_state_.num_reflected_updates_downloaded_total);
+ model_neutral_state_.num_updates_downloaded_total);
+ value->SetInteger(
+ "numTombstoneUpdatesDownloadedTotal",
+ model_neutral_state_.num_tombstone_updates_downloaded_total);
+ value->SetInteger(
+ "numReflectedUpdatesDownloadedTotal",
+ model_neutral_state_.num_reflected_updates_downloaded_total);
value->SetInteger("numLocalOverwrites",
model_neutral_state_.num_local_overwrites);
value->SetInteger("numServerOverwrites",
@@ -83,12 +83,9 @@ std::unique_ptr<base::DictionaryValue> SyncSessionSnapshot::ToValue() const {
ProgressMarkerMapToValue(download_progress_markers_));
value->SetBoolean("isSilenced", is_silenced_);
// We don't care too much if we lose precision here, also.
- value->SetInteger("numEncryptionConflicts",
- num_encryption_conflicts_);
- value->SetInteger("numHierarchyConflicts",
- num_hierarchy_conflicts_);
- value->SetInteger("numServerConflicts",
- num_server_conflicts_);
+ value->SetInteger("numEncryptionConflicts", num_encryption_conflicts_);
+ value->SetInteger("numHierarchyConflicts", num_hierarchy_conflicts_);
+ value->SetInteger("numServerConflicts", num_server_conflicts_);
value->SetInteger("numEntries", num_entries_);
value->SetString("legacySource",
GetUpdatesSourceString(legacy_updates_source_));
@@ -117,8 +114,8 @@ std::string SyncSessionSnapshot::ToString() const {
return json;
}
-const ProgressMarkerMap&
- SyncSessionSnapshot::download_progress_markers() const {
+const ProgressMarkerMap& SyncSessionSnapshot::download_progress_markers()
+ const {
return download_progress_markers_;
}
@@ -162,8 +159,8 @@ const std::vector<int>& SyncSessionSnapshot::num_entries_by_type() const {
return num_entries_by_type_;
}
-const std::vector<int>&
-SyncSessionSnapshot::num_to_delete_entries_by_type() const {
+const std::vector<int>& SyncSessionSnapshot::num_to_delete_entries_by_type()
+ const {
return num_to_delete_entries_by_type_;
}
« no previous file with comments | « components/sync/sessions/sync_session_snapshot.h ('k') | components/sync/sessions/sync_session_snapshot_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698