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

Unified Diff: chrome/browser/sync/glue/session_model_associator.cc

Issue 10808052: Tidy up Android's is-tablet functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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: chrome/browser/sync/glue/session_model_associator.cc
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index feef2cc5ac795766cdef48ae26ec68e237164f75..0cf69e62882042673c1f0884ef48e163aa0ea392 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -68,6 +68,12 @@ static const int kMaxSyncNavigationCount = 6;
// stale and becomes a candidate for garbage collection.
static const size_t kDefaultStaleSessionThresholdDays = 14; // 2 weeks.
+#if defined(OS_ANDROID)
+bool IsTabletUI() {
+ return CommandLine::ForCurrentProcess()->HasSwitch(switches::kTabletUI);
+}
+#endif
+
sync_pb::SessionHeader::DeviceType GetLocalDeviceType() {
// TODO(yfriedman): Refactor/combine with "DeviceInformation" code in
// sync_manager.cc[1060]
@@ -80,7 +86,7 @@ sync_pb::SessionHeader::DeviceType GetLocalDeviceType() {
#elif defined(OS_WIN)
return sync_pb::SessionHeader_DeviceType_TYPE_WIN;
#elif defined(OS_ANDROID)
- return syncer::internal::IsTabletUi() ?
+ return IsTabletUI() ?
sync_pb::SessionHeader_DeviceType_TYPE_TABLET :
sync_pb::SessionHeader_DeviceType_TYPE_PHONE;
#else

Powered by Google App Engine
This is Rietveld 408576698