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

Side by Side Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc

Issue 9303005: [NTP4] Experiment for adding Chrome Web Store link to footer. (Closed)
Patch Set: rebase Created 8 years, 10 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" 5 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 IDR_THEME_NTP_ATTRIBUTION) ? 289 IDR_THEME_NTP_ATTRIBUTION) ?
290 "true" : "false"); 290 "true" : "false");
291 localized_strings.SetString("title", 291 localized_strings.SetString("title",
292 l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE)); 292 l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE));
293 localized_strings.SetString("mostvisited", 293 localized_strings.SetString("mostvisited",
294 l10n_util::GetStringUTF16(IDS_NEW_TAB_MOST_VISITED)); 294 l10n_util::GetStringUTF16(IDS_NEW_TAB_MOST_VISITED));
295 localized_strings.SetString("restoreThumbnailsShort", 295 localized_strings.SetString("restoreThumbnailsShort",
296 l10n_util::GetStringUTF16(IDS_NEW_TAB_RESTORE_THUMBNAILS_SHORT_LINK)); 296 l10n_util::GetStringUTF16(IDS_NEW_TAB_RESTORE_THUMBNAILS_SHORT_LINK));
297 localized_strings.SetString("recentlyclosed", 297 localized_strings.SetString("recentlyclosed",
298 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED)); 298 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED));
299 localized_strings.SetString("webStoreTitle",
300 l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE));
299 localized_strings.SetString("closedwindowsingle", 301 localized_strings.SetString("closedwindowsingle",
300 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_SINGLE)); 302 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_SINGLE));
301 localized_strings.SetString("closedwindowmultiple", 303 localized_strings.SetString("closedwindowmultiple",
302 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_MULTIPLE)); 304 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_MULTIPLE));
303 localized_strings.SetString("attributionintro", 305 localized_strings.SetString("attributionintro",
304 l10n_util::GetStringUTF16(IDS_NEW_TAB_ATTRIBUTION_INTRO)); 306 l10n_util::GetStringUTF16(IDS_NEW_TAB_ATTRIBUTION_INTRO));
305 localized_strings.SetString("thumbnailremovednotification", 307 localized_strings.SetString("thumbnailremovednotification",
306 l10n_util::GetStringUTF16(IDS_NEW_TAB_THUMBNAIL_REMOVED_NOTIFICATION)); 308 l10n_util::GetStringUTF16(IDS_NEW_TAB_THUMBNAIL_REMOVED_NOTIFICATION));
307 localized_strings.SetString("undothumbnailremove", 309 localized_strings.SetString("undothumbnailremove",
308 l10n_util::GetStringUTF16(IDS_NEW_TAB_UNDO_THUMBNAIL_REMOVE)); 310 l10n_util::GetStringUTF16(IDS_NEW_TAB_UNDO_THUMBNAIL_REMOVE));
(...skipping 14 matching lines...) Expand all
323 localized_strings.SetString("applaunchtyperegular", 325 localized_strings.SetString("applaunchtyperegular",
324 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_REGULAR)); 326 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_REGULAR));
325 localized_strings.SetString("applaunchtypewindow", 327 localized_strings.SetString("applaunchtypewindow",
326 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_WINDOW)); 328 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_WINDOW));
327 localized_strings.SetString("applaunchtypefullscreen", 329 localized_strings.SetString("applaunchtypefullscreen",
328 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_FULLSCREEN)); 330 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_FULLSCREEN));
329 localized_strings.SetString("syncpromotext", 331 localized_strings.SetString("syncpromotext",
330 l10n_util::GetStringUTF16(IDS_SYNC_START_SYNC_BUTTON_LABEL)); 332 l10n_util::GetStringUTF16(IDS_SYNC_START_SYNC_BUTTON_LABEL));
331 localized_strings.SetString("syncLinkText", 333 localized_strings.SetString("syncLinkText",
332 l10n_util::GetStringUTF16(IDS_SYNC_ADVANCED_OPTIONS)); 334 l10n_util::GetStringUTF16(IDS_SYNC_ADVANCED_OPTIONS));
335 localized_strings.SetString("webStoreLink",
336 GetUrlWithLang(GURL(extension_urls::GetWebstoreLaunchURL())));
337 localized_strings.SetBoolean("isWebStoreExperimentEnabled",
338 NewTabUI::IsWebStoreExperimentEnabled());
339
333 #if defined(OS_CHROMEOS) 340 #if defined(OS_CHROMEOS)
334 localized_strings.SetString("expandMenu", 341 localized_strings.SetString("expandMenu",
335 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); 342 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND));
336 #endif 343 #endif
337 344
338 NewTabPageHandler::GetLocalizedValues(profile_, &localized_strings); 345 NewTabPageHandler::GetLocalizedValues(profile_, &localized_strings);
339 NTPLoginHandler::GetLocalizedValues(profile_, &localized_strings); 346 NTPLoginHandler::GetLocalizedValues(profile_, &localized_strings);
340 347
341 // Don't initiate the sync related message passing with the page if the sync 348 // Don't initiate the sync related message passing with the page if the sync
342 // code is not present. 349 // code is not present.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 // Get our template. 512 // Get our template.
506 static const base::StringPiece new_tab_theme_css( 513 static const base::StringPiece new_tab_theme_css(
507 ResourceBundle::GetSharedInstance().GetRawDataResource( 514 ResourceBundle::GetSharedInstance().GetRawDataResource(
508 IDR_NEW_TAB_4_THEME_CSS)); 515 IDR_NEW_TAB_4_THEME_CSS));
509 516
510 // Create the string from our template and the replacements. 517 // Create the string from our template and the replacements.
511 std::string css_string; 518 std::string css_string;
512 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); 519 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL);
513 new_tab_css_ = base::RefCountedString::TakeString(&css_string); 520 new_tab_css_ = base::RefCountedString::TakeString(&css_string);
514 } 521 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698