Index: chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc |
diff --git a/chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc b/chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc |
index 6a1affccfb4ef8e2998b3a9f2911113581d7e612..56590f6fb6e8899cd0a3b00661e1bc6353ec18db 100644 |
--- a/chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc |
+++ b/chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc |
@@ -14,6 +14,7 @@ |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/chrome_version_info.h" |
+#include "chrome/common/device_form_factor.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/notification_service.h" |
#include "content/public/browser/render_process_host.h" |
@@ -132,7 +133,7 @@ void NTPResourceCache::CreateNewTabHTML() { |
GetRawDataResource(IDR_NEW_TAB_ANDROID_HTML)); |
localized_strings.SetString( |
"device", |
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kTabletUI) ? |
+ GetDeviceFormFactor() == DEVICE_FORM_FACTOR_TABLET ? |
"tablet" : "phone"); |
bool bookmark_shortcuts_allowed = false; |