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

Side by Side Diff: chrome/browser/search/contextual_search_promo_source_android.cc

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/search/contextual_search_promo_source_android.h" 5 #include "chrome/browser/search/contextual_search_promo_source_android.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 strings_data.SetString( 144 strings_data.SetString(
145 "heading", l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_HEADER)); 145 "heading", l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_HEADER));
146 strings_data.SetString( 146 strings_data.SetString(
147 "optIn", l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_PROMO_OPTIN)); 147 "optIn", l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_PROMO_OPTIN));
148 strings_data.SetString( 148 strings_data.SetString(
149 "optOut", l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_PROMO_OPTOUT)); 149 "optOut", l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_PROMO_OPTOUT));
150 base::StringPiece html( 150 base::StringPiece html(
151 ResourceBundle::GetSharedInstance().GetRawDataResource( 151 ResourceBundle::GetSharedInstance().GetRawDataResource(
152 IDR_CONTEXTUAL_SEARCH_PROMO_HTML)); 152 IDR_CONTEXTUAL_SEARCH_PROMO_HTML));
153 webui::UseVersion2 version;
154 std::string response(webui::GetI18nTemplateHtml(html, &strings_data)); 153 std::string response(webui::GetI18nTemplateHtml(html, &strings_data));
155 callback.Run(base::RefCountedString::TakeString(&response)); 154 callback.Run(base::RefCountedString::TakeString(&response));
156 } 155 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698