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

Unified Diff: components/sync/sessions_impl/sync_session_context.h

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_impl/sync_session_context.h
diff --git a/sync/sessions/sync_session_context.h b/components/sync/sessions_impl/sync_session_context.h
similarity index 75%
rename from sync/sessions/sync_session_context.h
rename to components/sync/sessions_impl/sync_session_context.h
index 74213fabf29f1fe66cf2c0af4aafbd938bfdb003..81bec41501ac9ca6c6d13692383d3f89f9b89737 100644
--- a/sync/sessions/sync_session_context.h
+++ b/components/sync/sessions_impl/sync_session_context.h
@@ -12,8 +12,8 @@
//
// It can only be used from the SyncerThread.
-#ifndef SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
-#define SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
+#ifndef COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_CONTEXT_H_
+#define COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_CONTEXT_H_
#include <stdint.h>
@@ -21,10 +21,10 @@
#include <vector>
#include "base/macros.h"
-#include "sync/base/sync_export.h"
-#include "sync/engine/sync_engine_event_listener.h"
-#include "sync/sessions/debug_info_getter.h"
-#include "sync/sessions/model_type_registry.h"
+#include "components/sync/base/sync_export.h"
+#include "components/sync/engine_impl/sync_engine_event_listener.h"
+#include "components/sync/sessions_impl/debug_info_getter.h"
+#include "components/sync/sessions_impl/model_type_registry.h"
namespace syncer {
@@ -44,25 +44,20 @@ class TestScopedSessionEventListener;
class SYNC_EXPORT SyncSessionContext {
public:
- SyncSessionContext(
- ServerConnectionManager* connection_manager,
- syncable::Directory* directory,
- ExtensionsActivity* extensions_activity,
- const std::vector<SyncEngineEventListener*>& listeners,
- DebugInfoGetter* debug_info_getter,
- ModelTypeRegistry* model_type_registry,
- bool keystore_encryption_enabled,
- bool client_enabled_pre_commit_update_avoidance,
- const std::string& invalidator_client_id);
+ SyncSessionContext(ServerConnectionManager* connection_manager,
+ syncable::Directory* directory,
+ ExtensionsActivity* extensions_activity,
+ const std::vector<SyncEngineEventListener*>& listeners,
+ DebugInfoGetter* debug_info_getter,
+ ModelTypeRegistry* model_type_registry,
+ bool keystore_encryption_enabled,
+ bool client_enabled_pre_commit_update_avoidance,
+ const std::string& invalidator_client_id);
~SyncSessionContext();
- ServerConnectionManager* connection_manager() {
- return connection_manager_;
- }
- syncable::Directory* directory() {
- return directory_;
- }
+ ServerConnectionManager* connection_manager() { return connection_manager_; }
+ syncable::Directory* directory() { return directory_; }
ModelTypeSet GetEnabledTypes() const;
@@ -72,9 +67,7 @@ class SYNC_EXPORT SyncSessionContext {
return extensions_activity_.get();
}
- DebugInfoGetter* debug_info_getter() {
- return debug_info_getter_;
- }
+ DebugInfoGetter* debug_info_getter() { return debug_info_getter_; }
// Talk notification status.
void set_notifications_enabled(bool enabled) {
@@ -83,9 +76,7 @@ class SYNC_EXPORT SyncSessionContext {
bool notifications_enabled() { return notifications_enabled_; }
// Account name, set once a directory has been opened.
- void set_account_name(const std::string& name) {
- account_name_ = name;
- }
+ void set_account_name(const std::string& name) { account_name_ = name; }
const std::string& account_name() const { return account_name_; }
void set_max_commit_batch_size(int batch_size) {
@@ -105,9 +96,7 @@ class SYNC_EXPORT SyncSessionContext {
client_status_.set_hierarchy_conflict_detected(value);
}
- const sync_pb::ClientStatus& client_status() const {
- return client_status_;
- }
+ const sync_pb::ClientStatus& client_status() const { return client_status_; }
const std::string& invalidator_client_id() const {
return invalidator_client_id_;
@@ -122,13 +111,9 @@ class SYNC_EXPORT SyncSessionContext {
server_enabled_pre_commit_update_avoidance_ = value;
}
- ModelTypeRegistry* model_type_registry() {
- return model_type_registry_;
- }
+ ModelTypeRegistry* model_type_registry() { return model_type_registry_; }
- bool cookie_jar_mismatch() const {
- return cookie_jar_mismatch_;
- }
+ bool cookie_jar_mismatch() const { return cookie_jar_mismatch_; }
void set_cookie_jar_mismatch(bool cookie_jar_mismatch) {
cookie_jar_mismatch_ = cookie_jar_mismatch;
@@ -192,9 +177,9 @@ class SYNC_EXPORT SyncSessionContext {
// enable the pre-commit update avoidance experiment described above.
const bool client_enabled_pre_commit_update_avoidance_;
- // Whether the account(s) present in the content area's cookie jar match the
- // chrome account. If multiple accounts are present in the cookie jar, a
- // mismatch implies all of them are different from the chrome account.
+ // Whether the account(s) present in the content area's cookie jar match the
+ // chrome account. If multiple accounts are present in the cookie jar, a
+ // mismatch implies all of them are different from the chrome account.
bool cookie_jar_mismatch_;
// If there's a cookie jar mismatch, whether the cookie jar was empty or not.
@@ -206,4 +191,4 @@ class SYNC_EXPORT SyncSessionContext {
} // namespace sessions
} // namespace syncer
-#endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
+#endif // COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_CONTEXT_H_
« no previous file with comments | « components/sync/sessions_impl/sync_session.cc ('k') | components/sync/sessions_impl/sync_session_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698