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

Unified Diff: components/sync/core_impl/js_sync_manager_observer.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/core_impl/js_sync_manager_observer.cc
diff --git a/sync/internal_api/js_sync_manager_observer.cc b/components/sync/core_impl/js_sync_manager_observer.cc
similarity index 68%
rename from sync/internal_api/js_sync_manager_observer.cc
rename to components/sync/core_impl/js_sync_manager_observer.cc
index 1361c8b8fe5a3220a46b3ba197cae84b139cf0ab..2e628c2f9ce1df3734cf3900a20a5346595c165d 100644
--- a/sync/internal_api/js_sync_manager_observer.cc
+++ b/components/sync/core_impl/js_sync_manager_observer.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/js_sync_manager_observer.h"
+#include "components/sync/core_impl/js_sync_manager_observer.h"
#include <cstddef>
@@ -10,12 +10,12 @@
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
-#include "sync/internal_api/public/base/model_type.h"
-#include "sync/internal_api/public/change_record.h"
-#include "sync/internal_api/public/sessions/sync_session_snapshot.h"
-#include "sync/internal_api/public/util/sync_string_conversions.h"
-#include "sync/js/js_event_details.h"
-#include "sync/js/js_event_handler.h"
+#include "components/sync/base/model_type.h"
+#include "components/sync/base/sync_string_conversions.h"
+#include "components/sync/core/change_record.h"
+#include "components/sync/js/js_event_details.h"
+#include "components/sync/js/js_event_handler.h"
+#include "components/sync/sessions/sync_session_snapshot.h"
namespace syncer {
@@ -44,8 +44,8 @@ void JsSyncManagerObserver::OnConnectionStatusChange(ConnectionStatus status) {
}
base::DictionaryValue details;
details.SetString("status", ConnectionStatusToString(status));
- HandleJsEvent(FROM_HERE,
- "onConnectionStatusChange", JsEventDetails(&details));
+ HandleJsEvent(FROM_HERE, "onConnectionStatusChange",
+ JsEventDetails(&details));
}
void JsSyncManagerObserver::OnActionableError(
@@ -54,20 +54,19 @@ void JsSyncManagerObserver::OnActionableError(
return;
}
base::DictionaryValue details;
- details.Set("syncError", sync_error.ToValue());
- HandleJsEvent(FROM_HERE, "onActionableError",
- JsEventDetails(&details));
+ details.Set("syncError", sync_error.ToValue());
+ HandleJsEvent(FROM_HERE, "onActionableError", JsEventDetails(&details));
}
-void JsSyncManagerObserver::OnProtocolEvent(
- const ProtocolEvent& event) { }
+void JsSyncManagerObserver::OnProtocolEvent(const ProtocolEvent& event) {}
-void JsSyncManagerObserver::OnMigrationRequested(ModelTypeSet types) { }
+void JsSyncManagerObserver::OnMigrationRequested(ModelTypeSet types) {}
void JsSyncManagerObserver::OnInitializationComplete(
const WeakHandle<JsBackend>& js_backend,
const WeakHandle<DataTypeDebugInfoListener>& debug_info_listener,
- bool success, syncer::ModelTypeSet restored_types) {
+ bool success,
+ syncer::ModelTypeSet restored_types) {
if (!event_handler_.IsInitialized()) {
return;
}
@@ -77,20 +76,19 @@ void JsSyncManagerObserver::OnInitializationComplete(
base::DictionaryValue details;
details.Set("restoredTypes", ModelTypeSetToValue(restored_types));
- HandleJsEvent(FROM_HERE,
- "onInitializationComplete",
+ HandleJsEvent(FROM_HERE, "onInitializationComplete",
JsEventDetails(&details));
}
void JsSyncManagerObserver::HandleJsEvent(
const tracked_objects::Location& from_here,
- const std::string& name, const JsEventDetails& details) {
+ const std::string& name,
+ const JsEventDetails& details) {
if (!event_handler_.IsInitialized()) {
NOTREACHED();
return;
}
- event_handler_.Call(from_here,
- &JsEventHandler::HandleJsEvent, name, details);
+ event_handler_.Call(from_here, &JsEventHandler::HandleJsEvent, name, details);
}
} // namespace syncer
« no previous file with comments | « components/sync/core_impl/js_sync_manager_observer.h ('k') | components/sync/core_impl/js_sync_manager_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698