summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/js_sync_manager_observer.cc
diff options
context:
space:
mode:
authorzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-24 19:32:28 +0000
committerzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-24 19:32:28 +0000
commit90ce61b5448c93e52a34b71535d86605a4f7f90d (patch)
tree357c076b80e6bf248511878c8cde5b262466158f /sync/internal_api/js_sync_manager_observer.cc
parent7500c55e2fc2219e50e3b6b40e6c8e3ed3820d20 (diff)
downloadchromium_src-90ce61b5448c93e52a34b71535d86605a4f7f90d.zip
chromium_src-90ce61b5448c93e52a34b71535d86605a4f7f90d.tar.gz
chromium_src-90ce61b5448c93e52a34b71535d86605a4f7f90d.tar.bz2
[Sync] Convert SyncSessionSnapshot to a copy-able class.
Previously it was an immutable struct that was passed around by making dynamic allocations and passing pointers. We now just have a class with only getters and no setters, but support for default copy and assign. This cleans up some code and makes some future work easier to pass snapshots around. BUG=none TEST=sync_unit_tests Review URL: http://codereview.chromium.org/10197004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/js_sync_manager_observer.cc')
-rw-r--r--sync/internal_api/js_sync_manager_observer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sync/internal_api/js_sync_manager_observer.cc b/sync/internal_api/js_sync_manager_observer.cc
index b9cf9f3..5aa9dc3 100644
--- a/sync/internal_api/js_sync_manager_observer.cc
+++ b/sync/internal_api/js_sync_manager_observer.cc
@@ -31,12 +31,12 @@ void JsSyncManagerObserver::SetJsEventHandler(
}
void JsSyncManagerObserver::OnSyncCycleCompleted(
- const sessions::SyncSessionSnapshot* snapshot) {
+ const sessions::SyncSessionSnapshot& snapshot) {
if (!event_handler_.IsInitialized()) {
return;
}
DictionaryValue details;
- details.Set("snapshot", snapshot->ToValue());
+ details.Set("snapshot", snapshot.ToValue());
HandleJsEvent(FROM_HERE, "onSyncCycleCompleted", JsEventDetails(&details));
}