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

Side by Side Diff: chrome/browser/google/google_util.cc

Issue 176843022: Move UTF16ToASCII, remove WideToASCII. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
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/browser/google/google_util.h" 5 #include "chrome/browser/google/google_util.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 bool GetBrand(std::string* brand) { 133 bool GetBrand(std::string* brand) {
134 if (brand_for_testing) { 134 if (brand_for_testing) {
135 brand->assign(brand_for_testing); 135 brand->assign(brand_for_testing);
136 return true; 136 return true;
137 } 137 }
138 138
139 base::string16 brand16; 139 base::string16 brand16;
140 bool ret = GoogleUpdateSettings::GetBrand(&brand16); 140 bool ret = GoogleUpdateSettings::GetBrand(&brand16);
141 if (ret) 141 if (ret)
142 brand->assign(WideToASCII(brand16)); 142 brand->assign(base::UTF16ToASCII(brand16));
143 return ret; 143 return ret;
144 } 144 }
145 145
146 bool GetReactivationBrand(std::string* brand) { 146 bool GetReactivationBrand(std::string* brand) {
147 base::string16 brand16; 147 base::string16 brand16;
148 bool ret = GoogleUpdateSettings::GetReactivationBrand(&brand16); 148 bool ret = GoogleUpdateSettings::GetReactivationBrand(&brand16);
149 if (ret) 149 if (ret)
150 brand->assign(WideToASCII(brand16)); 150 brand->assign(base::UTF16ToASCII(brand16));
151 return ret; 151 return ret;
152 } 152 }
153 153
154 #else 154 #else
155 155
156 bool GetBrand(std::string* brand) { 156 bool GetBrand(std::string* brand) {
157 if (brand_for_testing) { 157 if (brand_for_testing) {
158 brand->assign(brand_for_testing); 158 brand->assign(brand_for_testing);
159 return true; 159 return true;
160 } 160 }
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 DCHECK(brand_for_testing == NULL); 301 DCHECK(brand_for_testing == NULL);
302 brand_for_testing = brand_.c_str(); 302 brand_for_testing = brand_.c_str();
303 } 303 }
304 304
305 BrandForTesting::~BrandForTesting() { 305 BrandForTesting::~BrandForTesting() {
306 brand_for_testing = NULL; 306 brand_for_testing = NULL;
307 } 307 }
308 308
309 309
310 } // namespace google_util 310 } // namespace google_util
OLDNEW
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/media_galleries/media_galleries_dialog_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698