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

Side by Side Diff: chrome_frame/simple_resource_loader.cc

Issue 113403006: Update some uses of char16 to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/utility/importer/ie_importer_win.cc ('k') | cloud_print/service/win/chrome_launcher.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_frame/simple_resource_loader.h" 5 #include "chrome_frame/simple_resource_loader.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 base::StringPiece data; 242 base::StringPiece data;
243 if (!data_pack_->GetStringPiece(message_id, &data)) { 243 if (!data_pack_->GetStringPiece(message_id, &data)) {
244 DLOG(ERROR) << "Unable to find string for resource id:" << message_id; 244 DLOG(ERROR) << "Unable to find string for resource id:" << message_id;
245 return std::wstring(); 245 return std::wstring();
246 } 246 }
247 247
248 // Data pack encodes strings as either UTF8 or UTF16. 248 // Data pack encodes strings as either UTF8 or UTF16.
249 base::string16 msg; 249 base::string16 msg;
250 if (data_pack_->GetTextEncodingType() == ui::DataPack::UTF16) { 250 if (data_pack_->GetTextEncodingType() == ui::DataPack::UTF16) {
251 msg = base::string16(reinterpret_cast<const char16*>(data.data()), 251 msg = base::string16(reinterpret_cast<const base::char16*>(data.data()),
252 data.length() / 2); 252 data.length() / 2);
253 } else if (data_pack_->GetTextEncodingType() == ui::DataPack::UTF8) { 253 } else if (data_pack_->GetTextEncodingType() == ui::DataPack::UTF8) {
254 msg = base::UTF8ToUTF16(data); 254 msg = base::UTF8ToUTF16(data);
255 } 255 }
256 return msg; 256 return msg;
257 } 257 }
258 258
259 // static 259 // static
260 std::wstring SimpleResourceLoader::GetLanguage() { 260 std::wstring SimpleResourceLoader::GetLanguage() {
261 return SimpleResourceLoader::GetInstance()->language_; 261 return SimpleResourceLoader::GetInstance()->language_;
262 } 262 }
263 263
264 // static 264 // static
265 std::wstring SimpleResourceLoader::Get(int message_id) { 265 std::wstring SimpleResourceLoader::Get(int message_id) {
266 SimpleResourceLoader* loader = SimpleResourceLoader::GetInstance(); 266 SimpleResourceLoader* loader = SimpleResourceLoader::GetInstance();
267 return loader->GetLocalizedResource(message_id); 267 return loader->GetLocalizedResource(message_id);
268 } 268 }
269 269
270 HMODULE SimpleResourceLoader::GetResourceModuleHandle() { 270 HMODULE SimpleResourceLoader::GetResourceModuleHandle() {
271 return locale_dll_handle_; 271 return locale_dll_handle_;
272 } 272 }
OLDNEW
« no previous file with comments | « chrome/utility/importer/ie_importer_win.cc ('k') | cloud_print/service/win/chrome_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698