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

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

Issue 126223: Replace std:;wstring with std::string in locale-name related APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/first_run_win.cc ('k') | chrome/browser/plugin_service.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_util.h" 5 #include "chrome/browser/google_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 15 matching lines...) Expand all
26 repl.SetQueryStr(query); 26 repl.SetQueryStr(query);
27 return url.ReplaceComponents(repl); 27 return url.ReplaceComponents(repl);
28 } 28 }
29 29
30 } // anonymous namespace 30 } // anonymous namespace
31 31
32 namespace google_util { 32 namespace google_util {
33 33
34 GURL AppendGoogleLocaleParam(const GURL& url) { 34 GURL AppendGoogleLocaleParam(const GURL& url) {
35 return AppendParam(url, "hl", 35 return AppendParam(url, "hl",
36 WideToUTF8(g_browser_process->GetApplicationLocale())); 36 g_browser_process->GetApplicationLocale());
37 } 37 }
38 38
39 GURL AppendGoogleTLDParam(const GURL& url) { 39 GURL AppendGoogleTLDParam(const GURL& url) {
40 const std::string google_domain( 40 const std::string google_domain(
41 net::RegistryControlledDomainService::GetDomainAndRegistry( 41 net::RegistryControlledDomainService::GetDomainAndRegistry(
42 GoogleURLTracker::GoogleURL())); 42 GoogleURLTracker::GoogleURL()));
43 const size_t first_dot = google_domain.find('.'); 43 const size_t first_dot = google_domain.find('.');
44 if (first_dot == std::string::npos) { 44 if (first_dot == std::string::npos) {
45 NOTREACHED(); 45 NOTREACHED();
46 return url; 46 return url;
47 } 47 }
48 return AppendParam(url, "sd", google_domain.substr(first_dot + 1)); 48 return AppendParam(url, "sd", google_domain.substr(first_dot + 1));
49 } 49 }
50 50
51 } // namespace google_util 51 } // namespace google_util
OLDNEW
« no previous file with comments | « chrome/browser/first_run_win.cc ('k') | chrome/browser/plugin_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698