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

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

Issue 50603005: Add cross-platform API to get the form factor of the device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applied form factor API to other files Created 7 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: chrome/browser/sync/glue/device_info.cc
diff --git a/chrome/browser/sync/glue/device_info.cc b/chrome/browser/sync/glue/device_info.cc
index 04836c49ac24ad785011485b5b890b7157f54ab2..fc11f0438e9009fb6cae4d8f945112deaaf017e1 100644
--- a/chrome/browser/sync/glue/device_info.cc
+++ b/chrome/browser/sync/glue/device_info.cc
@@ -12,13 +12,17 @@
#include "content/public/browser/browser_thread.h"
#include "sync/util/get_session_name.h"
+#if defined(OS_ANDROID)
Alexei Svitkine (slow) 2013/10/31 14:52:32 No need for the ifdef here, just add this include
yao 2013/11/01 14:37:59 Done.
+#include "chrome/common/device_form_factor.h"
+#endif
+
namespace browser_sync {
namespace {
#if defined(OS_ANDROID)
bool IsTabletUI() {
- return CommandLine::ForCurrentProcess()->HasSwitch(switches::kTabletUI);
+ return GetDeviceFormFactor() == DEVICE_FORM_FACTOR_TABLET;
}
#endif

Powered by Google App Engine
This is Rietveld 408576698