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

Side by Side Diff: chrome/browser/geolocation/geolocation_exceptions_table_model.cc

Issue 5959008: Remove wstring from l10n_util. Part 2.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/browser/gtk/download_item_gtk.cc » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/geolocation/geolocation_exceptions_table_model.h" 5 #include "chrome/browser/geolocation/geolocation_exceptions_table_model.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/l10n_util_collator.h" 8 #include "app/l10n_util_collator.h"
9 #include "app/table_model_observer.h" 9 #include "app/table_model_observer.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 if (entry.origin == entry.embedding_origin) { 145 if (entry.origin == entry.embedding_origin) {
146 return content_settings_helper::OriginToWString(entry.origin); 146 return content_settings_helper::OriginToWString(entry.origin);
147 } 147 }
148 std::wstring indent(L" "); 148 std::wstring indent(L" ");
149 if (entry.embedding_origin.is_empty()) { 149 if (entry.embedding_origin.is_empty()) {
150 // NOTE: As long as the user cannot add/edit entries from the exceptions 150 // NOTE: As long as the user cannot add/edit entries from the exceptions
151 // dialog, it's impossible to actually have a non-default setting for some 151 // dialog, it's impossible to actually have a non-default setting for some
152 // origin "embedded on any other site", so this row will never appear. If 152 // origin "embedded on any other site", so this row will never appear. If
153 // we add the ability to add/edit exceptions, we'll need to decide when to 153 // we add the ability to add/edit exceptions, we'll need to decide when to
154 // display this and how "removing" it will function. 154 // display this and how "removing" it will function.
155 return indent + 155 return indent + UTF16ToWideHack(l10n_util::GetStringUTF16(
156 l10n_util::GetString(IDS_EXCEPTIONS_GEOLOCATION_EMBEDDED_ANY_OTHER); 156 IDS_EXCEPTIONS_GEOLOCATION_EMBEDDED_ANY_OTHER));
157 } 157 }
158 return indent + l10n_util::GetStringF( 158 return indent + UTF16ToWideHack(l10n_util::GetStringFUTF16(
159 IDS_EXCEPTIONS_GEOLOCATION_EMBEDDED_ON_HOST, 159 IDS_EXCEPTIONS_GEOLOCATION_EMBEDDED_ON_HOST,
160 content_settings_helper::OriginToWString(entry.embedding_origin)); 160 WideToUTF16Hack(
161 content_settings_helper::OriginToWString(entry.embedding_origin))));
161 } 162 }
162 163
163 if (column_id == IDS_EXCEPTIONS_ACTION_HEADER) { 164 if (column_id == IDS_EXCEPTIONS_ACTION_HEADER) {
164 switch (entry.setting) { 165 switch (entry.setting) {
165 case CONTENT_SETTING_ALLOW: 166 case CONTENT_SETTING_ALLOW:
166 return l10n_util::GetString(IDS_EXCEPTIONS_ALLOW_BUTTON); 167 return UTF16ToWideHack(
168 l10n_util::GetStringUTF16(IDS_EXCEPTIONS_ALLOW_BUTTON));
167 case CONTENT_SETTING_BLOCK: 169 case CONTENT_SETTING_BLOCK:
168 return l10n_util::GetString(IDS_EXCEPTIONS_BLOCK_BUTTON); 170 return UTF16ToWideHack(
171 l10n_util::GetStringUTF16(IDS_EXCEPTIONS_BLOCK_BUTTON));
169 case CONTENT_SETTING_ASK: 172 case CONTENT_SETTING_ASK:
170 return l10n_util::GetString(IDS_EXCEPTIONS_ASK_BUTTON); 173 return UTF16ToWideHack(
174 l10n_util::GetStringUTF16(IDS_EXCEPTIONS_ASK_BUTTON));
171 case CONTENT_SETTING_DEFAULT: 175 case CONTENT_SETTING_DEFAULT:
172 return l10n_util::GetString(IDS_EXCEPTIONS_NOT_SET_BUTTON); 176 return UTF16ToWideHack(
177 l10n_util::GetStringUTF16(IDS_EXCEPTIONS_NOT_SET_BUTTON));
173 default: 178 default:
174 break; 179 break;
175 } 180 }
176 } 181 }
177 182
178 NOTREACHED(); 183 NOTREACHED();
179 return std::wstring(); 184 return std::wstring();
180 } 185 }
181 186
182 void GeolocationExceptionsTableModel::SetObserver( 187 void GeolocationExceptionsTableModel::SetObserver(
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // Add the "children" for any embedded settings. 251 // Add the "children" for any embedded settings.
247 GeolocationContentSettingsMap::OneOriginSettings::const_iterator i; 252 GeolocationContentSettingsMap::OneOriginSettings::const_iterator i;
248 for (i = settings.begin(); i != settings.end(); ++i) { 253 for (i = settings.begin(); i != settings.end(); ++i) {
249 // Skip the non-embedded setting which we already added above. 254 // Skip the non-embedded setting which we already added above.
250 if (i == parent) 255 if (i == parent)
251 continue; 256 continue;
252 257
253 entries_.push_back(Entry(origin, i->first, i->second)); 258 entries_.push_back(Entry(origin, i->first, i->second));
254 } 259 }
255 } 260 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/browser/gtk/download_item_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698