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

Unified Diff: chrome/browser/rlz/rlz.cc

Issue 7980013: After a successful ping of the RLZ server, make sure to update the cached (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 | « no previous file | chrome/browser/rlz/rlz_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/rlz/rlz.cc
===================================================================
--- chrome/browser/rlz/rlz.cc (revision 101949)
+++ chrome/browser/rlz/rlz.cc (working copy)
@@ -246,7 +246,7 @@
}
void RLZTracker::PingNowImpl() {
- // Needs to be evaluated. See http://crbug.com/62328.
+ // This is the entry point of a background thread, so I/O is allowed.
base::ThreadRestrictions::ScopedAllowIO allow_io;
std::wstring lang;
@@ -259,8 +259,15 @@
GoogleUpdateSettings::GetReferral(&referral);
if (SendFinancialPing(brand, lang, referral, is_organic(brand))) {
GoogleUpdateSettings::ClearReferral();
- base::AutoLock lock(cache_lock_);
- rlz_cache_.clear();
+
+ {
+ base::AutoLock lock(cache_lock_);
+ rlz_cache_.clear();
+ }
+
+ // Prime the RLZ cache for the access points we are interested in.
+ GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, NULL);
+ GetAccessPointRlz(rlz_lib::CHROME_HOME_PAGE, NULL);
}
}
@@ -378,7 +385,7 @@
}
bool RLZTracker::ScheduleGetAccessPointRlz(rlz_lib::AccessPoint point) {
- if (BrowserThread::CurrentlyOn(BrowserThread::FILE))
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI))
return false;
std::wstring* not_used = NULL;
« no previous file with comments | « no previous file | chrome/browser/rlz/rlz_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698