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

Issue 6028012: Fixed RLZTracker::GetAccessPointRlz to route IO calls to the FILE thread. (Closed)

Created:
9 years, 11 months ago by pastarmovj
Modified:
9 years, 7 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

The function is now only used with the CHROME_OMNIBOX point and the value is cached and returned from the cache on subsequent calls. All other access points will be always freshly fetched and returned. Future calls to this function with another access point should either be done on the FILE thread or implement caching the way it is done for Omnibox. Moreover if they implement the caching mechanism they should be prepared for using this function in asynchronous manner if called on another thread. BUG=62337 TEST=A search from branded browser through the omnibox-the rlz parameter should be appended to the query string. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=72337

Patch Set 1 #

Patch Set 2 : Cleand up debug code and added a DCHECK for wrong async call. #

Patch Set 3 : s/2010/2011/ #

Total comments: 2

Patch Set 4 : Added {} around multi-line block. #

Total comments: 6

Patch Set 5 : Moved the DelayedInitTask to the FILE thread. #

Total comments: 4

Patch Set 6 : Ensured the cached value is there when the flag for that is set. #

Patch Set 7 : Added thread safety to the RLZ code. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -17 lines) Patch
M chrome/browser/rlz/rlz.cc View 1 2 3 4 5 6 8 chunks +35 lines, -14 lines 0 comments Download
M chrome/browser/search_engines/search_terms_data.cc View 1 2 3 4 5 6 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
pastarmovj
Please review.
9 years, 11 months ago (2011-01-07 13:54:26 UTC) #1
jochen (gone - plz use gerrit)
adding cpu since I'm no RLZ expert myself http://codereview.chromium.org/6028012/diff/4001/chrome/browser/search_engines/search_terms_data.cc File chrome/browser/search_engines/search_terms_data.cc (right): http://codereview.chromium.org/6028012/diff/4001/chrome/browser/search_engines/search_terms_data.cc#newcode84 chrome/browser/search_engines/search_terms_data.cc:84: !GoogleUpdateSettings::IsOrganic(brand)) ...
9 years, 11 months ago (2011-01-07 14:00:31 UTC) #2
pastarmovj
Fixed the nit. Waiting for bot happiness (win*) http://codereview.chromium.org/6028012/diff/4001/chrome/browser/search_engines/search_terms_data.cc File chrome/browser/search_engines/search_terms_data.cc (right): http://codereview.chromium.org/6028012/diff/4001/chrome/browser/search_engines/search_terms_data.cc#newcode84 chrome/browser/search_engines/search_terms_data.cc:84: !GoogleUpdateSettings::IsOrganic(brand)) ...
9 years, 11 months ago (2011-01-07 14:06:04 UTC) #3
cpu_(ooo_6.6-7.5)
Please include rogerta@chromium.org, he refactored these. I'll probably miss something. On 2011/01/07 14:06:04, pastarmovj wrote: ...
9 years, 11 months ago (2011-01-11 19:52:26 UTC) #4
pastarmovj
@rogerta: Hi, can you please review this CL Carlos suggested you knew yourself best there. ...
9 years, 11 months ago (2011-01-12 10:04:51 UTC) #5
Roger Tawa OOO till Jul 10th
lgtm as long as the PSO folks are OK. http://codereview.chromium.org/6028012/diff/10001/chrome/browser/rlz/rlz.cc File chrome/browser/rlz/rlz.cc (right): http://codereview.chromium.org/6028012/diff/10001/chrome/browser/rlz/rlz.cc#newcode191 chrome/browser/rlz/rlz.cc:191: ...
9 years, 11 months ago (2011-01-12 15:46:52 UTC) #6
jochen (gone - plz use gerrit)
http://codereview.chromium.org/6028012/diff/10001/chrome/browser/rlz/rlz.cc File chrome/browser/rlz/rlz.cc (right): http://codereview.chromium.org/6028012/diff/10001/chrome/browser/rlz/rlz.cc#newcode191 chrome/browser/rlz/rlz.cc:191: RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &omnibox_rlz); On 2011/01/12 15:46:52, Roger Tawa wrote: > ...
9 years, 11 months ago (2011-01-13 09:25:25 UTC) #7
Roger Tawa OOO till Jul 10th
http://codereview.chromium.org/6028012/diff/10001/chrome/browser/rlz/rlz.cc File chrome/browser/rlz/rlz.cc (right): http://codereview.chromium.org/6028012/diff/10001/chrome/browser/rlz/rlz.cc#newcode191 chrome/browser/rlz/rlz.cc:191: RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &omnibox_rlz); On 2011/01/13 09:25:25, jochen wrote: > On ...
9 years, 11 months ago (2011-01-13 15:09:55 UTC) #8
pastarmovj
I guess we are now only waiting for the PSO people blessing. http://codereview.chromium.org/6028012/diff/10001/chrome/browser/rlz/rlz.cc File chrome/browser/rlz/rlz.cc ...
9 years, 11 months ago (2011-01-13 15:34:02 UTC) #9
Roger Tawa OOO till Jul 10th
http://codereview.chromium.org/6028012/diff/10001/chrome/browser/rlz/rlz.cc File chrome/browser/rlz/rlz.cc (right): http://codereview.chromium.org/6028012/diff/10001/chrome/browser/rlz/rlz.cc#newcode191 chrome/browser/rlz/rlz.cc:191: RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &omnibox_rlz); On 2011/01/13 15:34:02, pastarmovj wrote: > On ...
9 years, 11 months ago (2011-01-13 15:42:17 UTC) #10
Julian Pastarmov
I don't think so. I just cheched all calls this function makes and they all ...
9 years, 11 months ago (2011-01-14 16:31:32 UTC) #11
pastarmovj
Please review. Moved the DelayedInitTask to the FILE thread and it seems that it works ...
9 years, 11 months ago (2011-01-18 15:18:53 UTC) #12
Roger Tawa OOO till Jul 10th
http://codereview.chromium.org/6028012/diff/23001/chrome/browser/rlz/rlz.cc File chrome/browser/rlz/rlz.cc (right): http://codereview.chromium.org/6028012/diff/23001/chrome/browser/rlz/rlz.cc#newcode308 chrome/browser/rlz/rlz.cc:308: access_values_state = ACCESS_VALUES_FRESH; there is now the possibility that ...
9 years, 11 months ago (2011-01-18 21:00:13 UTC) #13
pastarmovj
http://codereview.chromium.org/6028012/diff/23001/chrome/browser/rlz/rlz.cc File chrome/browser/rlz/rlz.cc (right): http://codereview.chromium.org/6028012/diff/23001/chrome/browser/rlz/rlz.cc#newcode308 chrome/browser/rlz/rlz.cc:308: access_values_state = ACCESS_VALUES_FRESH; I don't think this is possible. ...
9 years, 11 months ago (2011-01-18 21:10:20 UTC) #14
Roger Tawa OOO till Jul 10th
http://codereview.chromium.org/6028012/diff/23001/chrome/browser/rlz/rlz.cc File chrome/browser/rlz/rlz.cc (right): http://codereview.chromium.org/6028012/diff/23001/chrome/browser/rlz/rlz.cc#newcode308 chrome/browser/rlz/rlz.cc:308: access_values_state = ACCESS_VALUES_FRESH; On 2011/01/18 21:10:20, pastarmovj wrote: > ...
9 years, 11 months ago (2011-01-19 01:57:51 UTC) #15
pastarmovj
I don't think concurrent access is that bad. Bad was that the cached value was ...
9 years, 11 months ago (2011-01-19 08:34:17 UTC) #16
Roger Tawa OOO till Jul 10th
Hi Julian, I believe that your assumption about this being safe is incorrect. The read/writes ...
9 years, 11 months ago (2011-01-20 07:04:55 UTC) #17
pastarmovj
On 2011/01/20 07:04:55, Roger Tawa wrote: > Hi Julian, > > I believe that your ...
9 years, 11 months ago (2011-01-24 16:00:45 UTC) #18
Roger Tawa OOO till Jul 10th
9 years, 11 months ago (2011-01-24 16:34:56 UTC) #19
lgtm

Awesome Julian!  Thanks for making the changes.

Powered by Google App Engine
This is Rietveld 408576698