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

Issue 303233006: Abstract GoogleURLTracker & google_util Profile dependencies (Closed)

Created:
6 years, 6 months ago by blundell
Modified:
6 years, 6 months ago
Reviewers:
Nico, Peter Kasting
CC:
chromium-reviews
Visibility:
Public.

Description

Abstract GoogleURLTracker & google_util Profile dependencies This CL eliminates GoogleURLTracker and google_util having static functions that take in Profiles as arguments and use the Profile to get at the GoogleURLTracker instance. Specifically, it does the following: - Introduces google_profile_helper, as well as a new GetGoogleHomePageURL(Profile) function that serves the purpose previously being served by GoogleURLTracker::GoogleURL(Profile). - The google_util GetGoogleCountryCode(Profile) and GetGoogleSearchURL(Profile) functions now take in the Google homepage URL to operate on rather than the Profile. - Turns GoogleURLTracker's static RequestServerCheck(Profile) and GoogleURLSearchCommitted(Profile) into instance methods, changing callsites to get the tracker from the factory and call the instance method on the tracker if it is not NULL. GoogleURLTracker still uses the Profile to get the Prefs; this will be changed in a different CL. BUG=373235, 373223 TBR=thakis Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274679

Patch Set 1 #

Patch Set 2 : Update comments #

Total comments: 21

Patch Set 3 : Response to review #

Patch Set 4 : Rebase #

Patch Set 5 : Build fix and rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -87 lines) Patch
M chrome/browser/android/logo_service.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/android/tab_android.cc View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/errorpage_browsertest.cc View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
A chrome/browser/google/google_profile_helper.h View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
A chrome/browser/google/google_profile_helper.cc View 1 2 1 chunk +21 lines, -0 lines 0 comments Download
M chrome/browser/google/google_url_tracker.h View 1 2 3 4 5 chunks +14 lines, -29 lines 0 comments Download
M chrome/browser/google/google_url_tracker.cc View 1 2 3 4 2 chunks +14 lines, -30 lines 0 comments Download
M chrome/browser/google/google_util.h View 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/google/google_util.cc View 1 2 3 2 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/profile_resetter/profile_resetter.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/search_engines/search_terms_data.cc View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/search_engines/template_url_service.cc View 2 chunks +12 lines, -4 lines 0 comments Download
M chrome/browser/ui/navigation_correction_tab_observer.cc View 1 2 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_edit_model.cc View 1 2 3 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
blundell
Hey Peter, After staring at the code for a while, this was the approach that ...
6 years, 6 months ago (2014-05-30 12:44:55 UTC) #1
Peter Kasting
https://codereview.chromium.org/303233006/diff/20001/chrome/browser/google/google_profile_helper.cc File chrome/browser/google/google_profile_helper.cc (right): https://codereview.chromium.org/303233006/diff/20001/chrome/browser/google/google_profile_helper.cc#newcode17 chrome/browser/google/google_profile_helper.cc:17: return google_util::GetGoogleCountryCode(GetGoogleHomePageURL(profile)); I wonder if this function, and the ...
6 years, 6 months ago (2014-05-30 20:50:38 UTC) #2
blundell
https://codereview.chromium.org/303233006/diff/20001/chrome/browser/google/google_profile_helper.cc File chrome/browser/google/google_profile_helper.cc (right): https://codereview.chromium.org/303233006/diff/20001/chrome/browser/google/google_profile_helper.cc#newcode17 chrome/browser/google/google_profile_helper.cc:17: return google_util::GetGoogleCountryCode(GetGoogleHomePageURL(profile)); Yep, you're right. Done. On 2014/05/30 20:50:39, ...
6 years, 6 months ago (2014-06-02 15:42:26 UTC) #3
Peter Kasting
LGTM. It seems lame to have this whole goog_profile_helper namespace and file just for one ...
6 years, 6 months ago (2014-06-02 18:50:18 UTC) #4
blundell
On 2014/06/02 18:50:18, Peter Kasting wrote: > LGTM. It seems lame to have this whole ...
6 years, 6 months ago (2014-06-02 18:56:27 UTC) #5
blundell
TBR=thakis for //chrome outside of //chrome/browser/google
6 years, 6 months ago (2014-06-03 08:34:08 UTC) #6
blundell
The CQ bit was checked by blundell@chromium.org
6 years, 6 months ago (2014-06-03 08:34:36 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/303233006/60001
6 years, 6 months ago (2014-06-03 08:36:49 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium ...
6 years, 6 months ago (2014-06-03 09:32:22 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-03 09:35:42 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/71269) linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chromeos_rel/builds/33749) linux_chromium_rel ...
6 years, 6 months ago (2014-06-03 09:35:43 UTC) #11
Nico
Is the CL description up-to-date? I don't see a GetGoogleCountryCode in google_profile_helper.
6 years, 6 months ago (2014-06-03 10:15:30 UTC) #12
blundell
whoops, CL description updated.
6 years, 6 months ago (2014-06-03 11:49:45 UTC) #13
blundell
The CQ bit was checked by blundell@chromium.org
6 years, 6 months ago (2014-06-03 11:49:53 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/303233006/80001
6 years, 6 months ago (2014-06-03 11:50:51 UTC) #15
blundell
The CQ bit was checked by blundell@chromium.org
6 years, 6 months ago (2014-06-03 20:15:11 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/303233006/100001
6 years, 6 months ago (2014-06-03 20:16:22 UTC) #17
commit-bot: I haz the power
6 years, 6 months ago (2014-06-04 00:14:57 UTC) #18
Message was sent while issue was closed.
Change committed as 274679

Powered by Google App Engine
This is Rietveld 408576698