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

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

Issue 8785016: Add menu option for disabling app notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another fix from review comments Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 localized_strings.SetString("undothumbnailremove", 310 localized_strings.SetString("undothumbnailremove",
311 l10n_util::GetStringUTF16(IDS_NEW_TAB_UNDO_THUMBNAIL_REMOVE)); 311 l10n_util::GetStringUTF16(IDS_NEW_TAB_UNDO_THUMBNAIL_REMOVE));
312 localized_strings.SetString("removethumbnailtooltip", 312 localized_strings.SetString("removethumbnailtooltip",
313 l10n_util::GetStringUTF16(IDS_NEW_TAB_REMOVE_THUMBNAIL_TOOLTIP)); 313 l10n_util::GetStringUTF16(IDS_NEW_TAB_REMOVE_THUMBNAIL_TOOLTIP));
314 localized_strings.SetString("appuninstall", 314 localized_strings.SetString("appuninstall",
315 l10n_util::GetStringFUTF16( 315 l10n_util::GetStringFUTF16(
316 IDS_NEW_TAB_APP_UNINSTALL, 316 IDS_NEW_TAB_APP_UNINSTALL,
317 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME))); 317 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)));
318 localized_strings.SetString("appoptions", 318 localized_strings.SetString("appoptions",
319 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_OPTIONS)); 319 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_OPTIONS));
320 localized_strings.SetString("appdisablenotifications",
321 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_DISABLE_NOTIFICATIONS));
320 localized_strings.SetString("appcreateshortcut", 322 localized_strings.SetString("appcreateshortcut",
321 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_CREATE_SHORTCUT)); 323 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_CREATE_SHORTCUT));
322 localized_strings.SetString("appDefaultPageName", 324 localized_strings.SetString("appDefaultPageName",
323 l10n_util::GetStringUTF16(IDS_APP_DEFAULT_PAGE_NAME)); 325 l10n_util::GetStringUTF16(IDS_APP_DEFAULT_PAGE_NAME));
324 localized_strings.SetString("applaunchtypepinned", 326 localized_strings.SetString("applaunchtypepinned",
325 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_PINNED)); 327 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_PINNED));
326 localized_strings.SetString("applaunchtyperegular", 328 localized_strings.SetString("applaunchtyperegular",
327 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_REGULAR)); 329 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_REGULAR));
328 localized_strings.SetString("applaunchtypewindow", 330 localized_strings.SetString("applaunchtypewindow",
329 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_WINDOW)); 331 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_WINDOW));
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 // Get our template. 511 // Get our template.
510 static const base::StringPiece new_tab_theme_css( 512 static const base::StringPiece new_tab_theme_css(
511 ResourceBundle::GetSharedInstance().GetRawDataResource( 513 ResourceBundle::GetSharedInstance().GetRawDataResource(
512 IDR_NEW_TAB_4_THEME_CSS)); 514 IDR_NEW_TAB_4_THEME_CSS));
513 515
514 // Create the string from our template and the replacements. 516 // Create the string from our template and the replacements.
515 std::string css_string; 517 std::string css_string;
516 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); 518 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL);
517 new_tab_css_ = base::RefCountedString::TakeString(&css_string); 519 new_tab_css_ = base::RefCountedString::TakeString(&css_string);
518 } 520 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698