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

Side by Side 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: s/2010/2011/ 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
« no previous file with comments | « chrome/browser/rlz/rlz.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 74
75 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) 75 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
76 std::wstring 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 std::wstring 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 std::wstring brand; 82 std::wstring brand;
83 // See http://crbug.com/62337.
84 base::ThreadRestrictions::ScopedAllowIO allow_io;
85 if (GoogleUpdateSettings::GetBrand(&brand) && !brand.empty() && 83 if (GoogleUpdateSettings::GetBrand(&brand) && !brand.empty() &&
86 !GoogleUpdateSettings::IsOrganic(brand)) 84 !GoogleUpdateSettings::IsOrganic(brand))
jochen (gone - plz use gerrit) 2011/01/07 14:00:32 nit { ... }
pastarmovj 2011/01/07 14:06:05 Done.
85 // This call will return false the first time(s) it is called until the
86 // value has been cached. This normally would mean that at most one omnibox
87 // search might not send the RLZ data but this is not really a problem.
87 RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &rlz_string); 88 RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &rlz_string);
88 return rlz_string; 89 return rlz_string;
89 } 90 }
90 #endif 91 #endif
91 92
92 // static 93 // static
93 void UIThreadSearchTermsData::SetGoogleBaseURL(std::string* google_base_url) { 94 void UIThreadSearchTermsData::SetGoogleBaseURL(std::string* google_base_url) {
94 delete google_base_url_; 95 delete google_base_url_;
95 google_base_url_ = google_base_url; 96 google_base_url_ = google_base_url;
96 } 97 }
OLDNEW
« 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