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

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: small formatting changes Created 7 years, 1 month 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..76033de2758e4eef9a5cd364e10fca0ec7f0c03a 100644
--- a/chrome/browser/sync/glue/device_info.cc
+++ b/chrome/browser/sync/glue/device_info.cc
@@ -11,6 +11,7 @@
#include "chrome/common/chrome_switches.h"
#include "content/public/browser/browser_thread.h"
#include "sync/util/get_session_name.h"
+#include "ui/base/device_form_factor.h"
namespace browser_sync {
@@ -18,7 +19,7 @@ namespace {
#if defined(OS_ANDROID)
bool IsTabletUI() {
- return CommandLine::ForCurrentProcess()->HasSwitch(switches::kTabletUI);
+ return ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET;
}
#endif

Powered by Google App Engine
This is Rietveld 408576698