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

Unified Diff: chrome/browser/sync/js/js_transaction_observer.cc

Issue 7926001: [Sync] Move change-related methods out of SyncManager::Observer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests Created 9 years, 3 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: chrome/browser/sync/js/js_transaction_observer.cc
diff --git a/chrome/browser/sync/js/js_transaction_observer.cc b/chrome/browser/sync/js/js_transaction_observer.cc
index c0d5b62489f84964dacd70d60d14643a561686f7..6bb89e5b2a431ed956e154d794c61d18dff4a650 100644
--- a/chrome/browser/sync/js/js_transaction_observer.cc
+++ b/chrome/browser/sync/js/js_transaction_observer.cc
@@ -47,29 +47,16 @@ const size_t kMutationLimit = 300;
} // namespace
-void JsTransactionObserver::OnTransactionMutate(
- const tracked_objects::Location& location,
- const syncable::WriterTag& writer,
- const syncable::ImmutableEntryKernelMutationMap& mutations,
+void JsTransactionObserver::OnTransactionWrite(
+ const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
const syncable::ModelTypeBitSet& models_with_changes) {
DCHECK(non_thread_safe_.CalledOnValidThread());
if (!event_handler_.IsInitialized()) {
return;
}
DictionaryValue details;
- details.SetString("location", location.ToString());
- details.SetString("writer", syncable::WriterTagToString(writer));
- Value* mutations_value = NULL;
- const size_t mutations_size = mutations.Get().size();
- if (mutations_size <= kMutationLimit) {
- mutations_value = syncable::EntryKernelMutationMapToValue(mutations.Get());
- } else {
- mutations_value =
- Value::CreateStringValue(
- base::Uint64ToString(static_cast<uint64>(mutations_size)) +
- " mutations");
- }
- details.Set("mutations", mutations_value);
+ details.Set("writeTransactionInfo",
+ write_transaction_info.Get().ToValue(kMutationLimit));
tim (not reviewing) 2011/09/21 16:12:03 nit - indent
akalin 2011/09/21 19:49:38 Done.
details.Set("modelsWithChanges",
syncable::ModelTypeBitSetToValue(models_with_changes));
HandleJsEvent(FROM_HERE, "onTransactionMutate", JsEventDetails(&details));

Powered by Google App Engine
This is Rietveld 408576698