| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |