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

Unified Diff: components/sync_driver/local_device_info_provider_impl.h

Issue 1397913002: [Sync] Componentize local_device_info_provider_impl and test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android Created 5 years, 2 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_driver/local_device_info_provider_impl.h
diff --git a/chrome/browser/sync/glue/local_device_info_provider_impl.h b/components/sync_driver/local_device_info_provider_impl.h
similarity index 58%
rename from chrome/browser/sync/glue/local_device_info_provider_impl.h
rename to components/sync_driver/local_device_info_provider_impl.h
index 7323cf2db057f08c23849c2fc8c8e04d703b34be..306f81fa55c4bd3febcfc0de7892dbe109dea147 100644
--- a/chrome/browser/sync/glue/local_device_info_provider_impl.h
+++ b/components/sync_driver/local_device_info_provider_impl.h
@@ -2,36 +2,51 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_IMPL_H_
-#define CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_IMPL_H_
+#ifndef COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_IMPL_H_
+#define COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_IMPL_H_
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "components/sync_driver/device_info.h"
#include "components/sync_driver/local_device_info_provider.h"
+#include "components/version_info/version_info.h"
namespace browser_sync {
class LocalDeviceInfoProviderImpl
: public sync_driver::LocalDeviceInfoProvider {
public:
- LocalDeviceInfoProviderImpl();
+ LocalDeviceInfoProviderImpl(version_info::Channel channel,
+ const std::string& version,
+ bool is_tablet);
~LocalDeviceInfoProviderImpl() override;
// LocalDeviceInfoProvider implementation.
const sync_driver::DeviceInfo* GetLocalDeviceInfo() const override;
std::string GetSyncUserAgent() const override;
std::string GetLocalSyncCacheGUID() const override;
- void Initialize(const std::string& cache_guid,
- const std::string& signin_scoped_device_id) override;
+ void Initialize(
+ const std::string& cache_guid,
+ const std::string& signin_scoped_device_id,
+ const scoped_refptr<base::TaskRunner>& blocking_task_runner) override;
scoped_ptr<Subscription> RegisterOnInitializedCallback(
const base::Closure& callback) override;
private:
-
void InitializeContinuation(const std::string& guid,
const std::string& signin_scoped_device_id,
const std::string& session_name);
+ // The channel (CANARY, DEV, BETA, etc.) of the current client.
+ const version_info::Channel channel_;
+
+ // The version string for the current client.
+ const std::string version_;
+
+ // Whether this device has a tablet form factor (only used on Android
+ // devices).
+ const bool is_tablet_;
+
std::string cache_guid_;
scoped_ptr<sync_driver::DeviceInfo> local_device_info_;
base::CallbackList<void(void)> callback_list_;
@@ -42,4 +57,4 @@ class LocalDeviceInfoProviderImpl
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_IMPL_H_
+#endif // COMPONENTS_SYNC_DRIVER_LOCAL_DEVICE_INFO_PROVIDER_IMPL_H_
« no previous file with comments | « components/sync_driver/local_device_info_provider.h ('k') | components/sync_driver/local_device_info_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698