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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache_android.cc

Issue 10797053: Add support for differentiating the form factor for Android NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/ntp_resource_cache_android.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache_android.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache_android.cc
index 61d623040d1f91d2ed2b210927715bd6ebec91ba..d6a3707e5fff35906c098b282955f555a4985bbf 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache_android.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache_android.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
+#include "base/command_line.h"
#include "base/memory/ref_counted_memory.h"
#include "base/string16.h"
#include "base/string_piece.h"
@@ -13,6 +14,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/ntp/new_tab_page_handler.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/jstemplate_builder.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
@@ -76,7 +78,10 @@ void NTPResourceCache::CreateNewTabHTML() {
base::StringPiece new_tab_html(ResourceBundle::GetSharedInstance().
GetRawDataResource(IDR_NEW_TAB_4_HTML,
ui::SCALE_FACTOR_NONE));
-
+ localized_strings.SetString(
+ "device",
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kTabletUi) ?
+ "tablet" : "phone");
const char* new_tab_link = kLearnMoreIncognitoUrl;
string16 learnMoreLink = ASCIIToUTF16(
google_util::AppendGoogleLocaleParam(GURL(new_tab_link)).spec());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698