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

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

Issue 1104513003: Omnibox: Remove Hint Text Code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed WITH_DEFAULT_SEARCH_PROVIDER part of string Created 5 years, 8 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/app/generated_resources.grd ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/local_ntp_source.h" 5 #include "chrome/browser/search/local_ntp_source.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_string_value_serializer.h" 8 #include "base/json/json_string_value_serializer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Adds a localized string keyed by resource id to the dictionary. 115 // Adds a localized string keyed by resource id to the dictionary.
116 void AddString(base::DictionaryValue* dictionary, 116 void AddString(base::DictionaryValue* dictionary,
117 const std::string& key, 117 const std::string& key,
118 int resource_id) { 118 int resource_id) {
119 dictionary->SetString(key, l10n_util::GetStringUTF16(resource_id)); 119 dictionary->SetString(key, l10n_util::GetStringUTF16(resource_id));
120 } 120 }
121 121
122 // Adds a localized string for the Google searchbox placeholder text. 122 // Adds a localized string for the Google searchbox placeholder text.
123 void AddGoogleSearchboxPlaceholderString(base::DictionaryValue* dictionary) { 123 void AddGoogleSearchboxPlaceholderString(base::DictionaryValue* dictionary) {
124 base::string16 placeholder = l10n_util::GetStringFUTF16( 124 base::string16 placeholder = l10n_util::GetStringFUTF16(
125 IDS_OMNIBOX_EMPTY_HINT_WITH_DEFAULT_SEARCH_PROVIDER, 125 IDS_SEARCH_BOX_EMPTY_HINT,
126 base::ASCIIToUTF16("Google")); 126 base::ASCIIToUTF16("Google"));
127 dictionary->SetString("searchboxPlaceholder", placeholder); 127 dictionary->SetString("searchboxPlaceholder", placeholder);
128 } 128 }
129 129
130 // Populates |translated_strings| dictionary for the local NTP. |is_google| 130 // Populates |translated_strings| dictionary for the local NTP. |is_google|
131 // indicates that this page is the Google Local NTP. 131 // indicates that this page is the Google Local NTP.
132 scoped_ptr<base::DictionaryValue> GetTranslatedStrings(bool is_google) { 132 scoped_ptr<base::DictionaryValue> GetTranslatedStrings(bool is_google) {
133 scoped_ptr<base::DictionaryValue> translated_strings( 133 scoped_ptr<base::DictionaryValue> translated_strings(
134 new base::DictionaryValue()); 134 new base::DictionaryValue());
135 135
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 251 }
252 } 252 }
253 return false; 253 return false;
254 } 254 }
255 255
256 std::string LocalNtpSource::GetContentSecurityPolicyFrameSrc() const { 256 std::string LocalNtpSource::GetContentSecurityPolicyFrameSrc() const {
257 // Allow embedding of most visited iframes. 257 // Allow embedding of most visited iframes.
258 return base::StringPrintf("frame-src %s;", 258 return base::StringPrintf("frame-src %s;",
259 chrome::kChromeSearchMostVisitedUrl); 259 chrome::kChromeSearchMostVisitedUrl);
260 } 260 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698