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

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

Issue 11416322: [Android] Fix "remove" and "remove all" usage on NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « chrome/browser/resources/ntp_android/ntp_android.js ('k') | no next file » | 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED)); 74 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED));
75 localized_strings.SetString("opentabslastsynced", 75 localized_strings.SetString("opentabslastsynced",
76 l10n_util::GetStringUTF16(IDS_SYNC_NTP_OPEN_TABS_LAST_SYNCED)); 76 l10n_util::GetStringUTF16(IDS_SYNC_NTP_OPEN_TABS_LAST_SYNCED));
77 localized_strings.SetString("elementopeninnewtab", 77 localized_strings.SetString("elementopeninnewtab",
78 l10n_util::GetStringUTF16(IDS_NEW_TAB_CONTEXT_MENU_OPEN_IN_NEW_TAB)); 78 l10n_util::GetStringUTF16(IDS_NEW_TAB_CONTEXT_MENU_OPEN_IN_NEW_TAB));
79 localized_strings.SetString("elementopeninincognitotab", 79 localized_strings.SetString("elementopeninincognitotab",
80 l10n_util::GetStringUTF16( 80 l10n_util::GetStringUTF16(
81 IDS_NEW_TAB_CONTEXT_MENU_OPEN_IN_INCOGNITO_TAB)); 81 IDS_NEW_TAB_CONTEXT_MENU_OPEN_IN_INCOGNITO_TAB));
82 localized_strings.SetString("elementremove", 82 localized_strings.SetString("elementremove",
83 l10n_util::GetStringUTF16(IDS_NEW_TAB_CONTEXT_MENU_REMOVE)); 83 l10n_util::GetStringUTF16(IDS_NEW_TAB_CONTEXT_MENU_REMOVE));
84 localized_strings.SetString("removeall",
85 l10n_util::GetStringUTF16(IDS_NEW_TAB_CONTEXT_MENU_REMOVE_ALL));
84 localized_strings.SetString("bookmarkedit", 86 localized_strings.SetString("bookmarkedit",
85 l10n_util::GetStringUTF16(IDS_NEW_TAB_CONTEXT_MENU_EDIT_BOOKMARK)); 87 l10n_util::GetStringUTF16(IDS_NEW_TAB_CONTEXT_MENU_EDIT_BOOKMARK));
86 localized_strings.SetString("bookmarkdelete", 88 localized_strings.SetString("bookmarkdelete",
87 l10n_util::GetStringUTF16(IDS_NEW_TAB_CONTEXT_MENU_DELETE_BOOKMARK)); 89 l10n_util::GetStringUTF16(IDS_NEW_TAB_CONTEXT_MENU_DELETE_BOOKMARK));
88 localized_strings.SetString("bookmarkshortcut", 90 localized_strings.SetString("bookmarkshortcut",
89 l10n_util::GetStringUTF16(IDS_NEW_TAB_CONTEXT_MENU_BOOKMARK_SHORTCUT)); 91 l10n_util::GetStringUTF16(IDS_NEW_TAB_CONTEXT_MENU_BOOKMARK_SHORTCUT));
90 localized_strings.SetString("editfolder", 92 localized_strings.SetString("editfolder",
91 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDIT_FOLDER)); 93 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDIT_FOLDER));
92 localized_strings.SetString("deletefolder", 94 localized_strings.SetString("deletefolder",
93 l10n_util::GetStringUTF16(IDS_BOOKMARK_REMOVE_FOLDER)); 95 l10n_util::GetStringUTF16(IDS_BOOKMARK_REMOVE_FOLDER));
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 size_t after_offset = pos + template_data_placeholder.size(); 135 size_t after_offset = pos + template_data_placeholder.size();
134 full_html.append(new_tab_html.data() + after_offset, 136 full_html.append(new_tab_html.data() + after_offset,
135 new_tab_html.size() - after_offset); 137 new_tab_html.size() - after_offset);
136 } else { 138 } else {
137 NOTREACHED(); 139 NOTREACHED();
138 full_html.assign(new_tab_html.data(), new_tab_html.size()); 140 full_html.assign(new_tab_html.data(), new_tab_html.size());
139 } 141 }
140 142
141 new_tab_html_ = base::RefCountedString::TakeString(&full_html); 143 new_tab_html_ = base::RefCountedString::TakeString(&full_html);
142 } 144 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp_android/ntp_android.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698