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

Side by Side Diff: chrome/browser/search_engines/search_terms_data.cc

Issue 6291003: Revert 71485 - Remove wstring from TemplateURL and friends.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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) 2011 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/search_engines/search_terms_data.h" 5 #include "chrome/browser/search_engines/search_terms_data.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/browser_thread.h" 10 #include "chrome/browser/browser_thread.h"
11 #include "chrome/browser/google/google_url_tracker.h" 11 #include "chrome/browser/google/google_url_tracker.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 (*google_base_url_) : GoogleURLTracker::GoogleURL().spec(); 66 (*google_base_url_) : GoogleURLTracker::GoogleURL().spec();
67 } 67 }
68 68
69 std::string UIThreadSearchTermsData::GetApplicationLocale() const { 69 std::string UIThreadSearchTermsData::GetApplicationLocale() const {
70 DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) || 70 DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) ||
71 BrowserThread::CurrentlyOn(BrowserThread::UI)); 71 BrowserThread::CurrentlyOn(BrowserThread::UI));
72 return g_browser_process->GetApplicationLocale(); 72 return g_browser_process->GetApplicationLocale();
73 } 73 }
74 74
75 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) 75 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
76 string16 UIThreadSearchTermsData::GetRlzParameterValue() const { 76 std::wstring UIThreadSearchTermsData::GetRlzParameterValue() const {
77 DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) || 77 DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) ||
78 BrowserThread::CurrentlyOn(BrowserThread::UI)); 78 BrowserThread::CurrentlyOn(BrowserThread::UI));
79 string16 rlz_string; 79 std::wstring rlz_string;
80 // For organic brandcodes do not use rlz at all. Empty brandcode usually 80 // For organic brandcodes do not use rlz at all. Empty brandcode usually
81 // means a chromium install. This is ok. 81 // means a chromium install. This is ok.
82 string16 brand; 82 std::wstring brand;
83 // See http://crbug.com/62337 . 83 // See http://crbug.com/62337.
84 base::ThreadRestrictions::ScopedAllowIO allow_io; 84 base::ThreadRestrictions::ScopedAllowIO allow_io;
85 if (GoogleUpdateSettings::GetBrand(&brand) && !brand.empty() && 85 if (GoogleUpdateSettings::GetBrand(&brand) && !brand.empty() &&
86 !GoogleUpdateSettings::IsOrganic(brand)) 86 !GoogleUpdateSettings::IsOrganic(brand))
87 RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &rlz_string); 87 RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &rlz_string);
88 return rlz_string; 88 return rlz_string;
89 } 89 }
90 #endif 90 #endif
91 91
92 // static 92 // static
93 void UIThreadSearchTermsData::SetGoogleBaseURL(std::string* google_base_url) { 93 void UIThreadSearchTermsData::SetGoogleBaseURL(std::string* google_base_url) {
94 delete google_base_url_; 94 delete google_base_url_;
95 google_base_url_ = google_base_url; 95 google_base_url_ = google_base_url;
96 } 96 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/search_terms_data.h ('k') | chrome/browser/search_engines/template_url.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698