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

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

Issue 555983002: [Search] Tweak the styling for the first-run experience (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 6 years, 3 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/resources/contextual_search/promo.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 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 "base/memory/ref_counted_memory.h" 7 #include "base/memory/ref_counted_memory.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 callback.Run(response.get()); 84 callback.Run(response.get());
85 } 85 }
86 86
87 void ContextualSearchPromoSourceAndroid::SendHtmlWithStrings( 87 void ContextualSearchPromoSourceAndroid::SendHtmlWithStrings(
88 const content::URLDataSource::GotDataCallback& callback) { 88 const content::URLDataSource::GotDataCallback& callback) {
89 base::DictionaryValue strings_data; 89 base::DictionaryValue strings_data;
90 strings_data.SetString( 90 strings_data.SetString(
91 "description", 91 "description",
92 l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_PROMO_DESCRIPTION)); 92 l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_PROMO_DESCRIPTION));
93 strings_data.SetString( 93 strings_data.SetString(
94 "heading", l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_HEADER));
95 strings_data.SetString(
94 "optIn", l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_PROMO_OPTIN)); 96 "optIn", l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_PROMO_OPTIN));
95 strings_data.SetString( 97 strings_data.SetString(
96 "optOut", l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_PROMO_OPTOUT)); 98 "optOut", l10n_util::GetStringUTF16(IDS_CONTEXTUAL_SEARCH_PROMO_OPTOUT));
97 base::StringPiece html( 99 base::StringPiece html(
98 ResourceBundle::GetSharedInstance().GetRawDataResource( 100 ResourceBundle::GetSharedInstance().GetRawDataResource(
99 IDR_CONTEXTUAL_SEARCH_PROMO_HTML)); 101 IDR_CONTEXTUAL_SEARCH_PROMO_HTML));
100 webui::UseVersion2 version; 102 webui::UseVersion2 version;
101 std::string response(webui::GetI18nTemplateHtml(html, &strings_data)); 103 std::string response(webui::GetI18nTemplateHtml(html, &strings_data));
102 callback.Run(base::RefCountedString::TakeString(&response)); 104 callback.Run(base::RefCountedString::TakeString(&response));
103 } 105 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/contextual_search/promo.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698