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

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

Issue 883603002: Rename StreamlinedHostedApps to NewBookmarkApps in the code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments and variables Created 5 years, 11 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
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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 // On Mac OS X 10.7+, horizontal scrolling can be treated as a back or 490 // On Mac OS X 10.7+, horizontal scrolling can be treated as a back or
491 // forward gesture. Pass through a flag that indicates whether or not that 491 // forward gesture. Pass through a flag that indicates whether or not that
492 // feature is enabled. 492 // feature is enabled.
493 load_time_data.SetBoolean("isSwipeTrackingFromScrollEventsEnabled", 493 load_time_data.SetBoolean("isSwipeTrackingFromScrollEventsEnabled",
494 is_swipe_tracking_from_scroll_events_enabled_); 494 is_swipe_tracking_from_scroll_events_enabled_);
495 495
496 load_time_data.SetBoolean("showApps", should_show_apps_page_); 496 load_time_data.SetBoolean("showApps", should_show_apps_page_);
497 load_time_data.SetBoolean("showWebStoreIcon", 497 load_time_data.SetBoolean("showWebStoreIcon",
498 !prefs->GetBoolean(prefs::kHideWebStoreIcon)); 498 !prefs->GetBoolean(prefs::kHideWebStoreIcon));
499 499
500 bool streamlined_hosted_apps = 500 bool bookmark_apps_enabled = extensions::util::IsNewBookmarkAppsEnabled();
501 extensions::util::IsStreamlinedHostedAppsEnabled(); 501 load_time_data.SetBoolean("enableNewBookmarkApps", bookmark_apps_enabled);
502 load_time_data.SetBoolean("enableStreamlinedHostedApps", 502 // Use a different string for launching as a regular tab when bookmark apps
503 streamlined_hosted_apps); 503 // are enabled.
504 // Use a different string for launching as a regular tab for streamlined 504 if (bookmark_apps_enabled) {
505 // hosted apps.
506 if (streamlined_hosted_apps) {
507 load_time_data.SetString("applaunchtypetab", 505 load_time_data.SetString("applaunchtypetab",
508 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_TAB)); 506 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_TAB));
509 } 507 }
510 508
511 #if defined(OS_CHROMEOS) 509 #if defined(OS_CHROMEOS)
512 load_time_data.SetString("expandMenu", 510 load_time_data.SetString("expandMenu",
513 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); 511 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND));
514 #endif 512 #endif
515 513
516 NewTabPageHandler::GetLocalizedValues(profile_, &load_time_data); 514 NewTabPageHandler::GetLocalizedValues(profile_, &load_time_data);
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 // Get our template. 718 // Get our template.
721 static const base::StringPiece new_tab_theme_css( 719 static const base::StringPiece new_tab_theme_css(
722 ResourceBundle::GetSharedInstance().GetRawDataResource( 720 ResourceBundle::GetSharedInstance().GetRawDataResource(
723 IDR_NEW_TAB_4_THEME_CSS)); 721 IDR_NEW_TAB_4_THEME_CSS));
724 722
725 // Create the string from our template and the replacements. 723 // Create the string from our template and the replacements.
726 std::string css_string; 724 std::string css_string;
727 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); 725 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL);
728 new_tab_css_ = base::RefCountedString::TakeString(&css_string); 726 new_tab_css_ = base::RefCountedString::TakeString(&css_string);
729 } 727 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698