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

Issue 10262026: A few small tweaks based on further analysis of GoogleURLTracker: (Closed)

Created:
8 years, 7 months ago by Peter Kasting
Modified:
8 years, 7 months ago
Reviewers:
Ilya Sherman
CC:
chromium-reviews
Visibility:
Public.

Description

A few small tweaks based on further analysis of GoogleURLTracker: * Go ahead and redo even pending searches. If I have a pending search in tab B and say "yes, retarget my Google URL" in tab A, it's reasonable to retarget tab B instead of letting it proceed with the old URL. * Make the code safe even if AddInfoBar() fails for some reason. We already deleted the infobar and removed it from the GoogleURLTracker's map, but the existing code briefly accessed a member after "this" had been deleted. Simple fix. * While I'm at it, also DCHECK() against adding the same infobar twice in AddInfoBar() itself. This won't happen with the existing code, but I managed to introduce such a problem while doing some other experiments. BUG=110158 TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=135054

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -45 lines) Patch
M chrome/browser/google/google_url_tracker.cc View 2 chunks +23 lines, -24 lines 0 comments Download
M chrome/browser/infobars/infobar_tab_helper.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/infobars/infobar_tab_helper.cc View 1 4 chunks +14 lines, -20 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Peter Kasting
8 years, 7 months ago (2012-05-01 00:27:51 UTC) #1
Ilya Sherman
8 years, 7 months ago (2012-05-02 03:52:43 UTC) #2
LGTM

https://chromiumcodereview.appspot.com/10262026/diff/1/chrome/browser/infobar...
File chrome/browser/infobars/infobar_tab_helper.cc (right):

https://chromiumcodereview.appspot.com/10262026/diff/1/chrome/browser/infobar...
chrome/browser/infobars/infobar_tab_helper.cc:42: InfoBarDelegate* delegate_at_i
= GetInfoBarDelegateAt(i);
nit: Perhaps use an iterator instead of creating this temporary variable (unless
it's important to use GetInfoBarDelegateAt() here)?

Powered by Google App Engine
This is Rietveld 408576698