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

Unified Diff: chrome/browser/search_engines/search_terms_data.cc

Issue 6028012: Fixed RLZTracker::GetAccessPointRlz to route IO calls to the FILE thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added thread safety to the RLZ code. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/rlz/rlz.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_engines/search_terms_data.cc
diff --git a/chrome/browser/search_engines/search_terms_data.cc b/chrome/browser/search_engines/search_terms_data.cc
index 7b09df250d341af308dbe6632a9ba629128f58ba..3e80c7f4fae2072c6539ba867e740fc9f13cfd00 100644
--- a/chrome/browser/search_engines/search_terms_data.cc
+++ b/chrome/browser/search_engines/search_terms_data.cc
@@ -80,11 +80,13 @@ string16 UIThreadSearchTermsData::GetRlzParameterValue() const {
// For organic brandcodes do not use rlz at all. Empty brandcode usually
// means a chromium install. This is ok.
string16 brand;
- // See http://crbug.com/62337 .
- base::ThreadRestrictions::ScopedAllowIO allow_io;
if (GoogleUpdateSettings::GetBrand(&brand) && !brand.empty() &&
- !GoogleUpdateSettings::IsOrganic(brand))
+ !GoogleUpdateSettings::IsOrganic(brand)) {
+ // This call will return false the first time(s) it is called until the
+ // value has been cached. This normally would mean that at most one omnibox
+ // search might not send the RLZ data but this is not really a problem.
RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &rlz_string);
+ }
return rlz_string;
}
#endif
« no previous file with comments | « chrome/browser/rlz/rlz.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698