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

Issue 2637953003: Refactor SearchGeolocationService to make it testable (Closed)

Created:
3 years, 11 months ago by raymes
Modified:
3 years, 11 months ago
Reviewers:
dominickn, gone
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor SearchGeolocationService to make it testable This refactors SearchGeolocationService to make it testable. Search engine related functionality, which cannot easily be mocked out in unittests, is moved into a delegate class. A couple of other minor fixes are made: -An IsOffTheRecord check is made into a DCHECK since the class should never be constructed for an off the record profile. -The CCTLD is no longer stored because it was never used. -An extra DCHECK is added in SetDSEGeolocationSetting to ensure the setting is only changed when Google is the current search engine. BUG=674398 Review-Url: https://codereview.chromium.org/2637953003 Cr-Commit-Position: refs/heads/master@{#445304} Committed: https://chromium.googlesource.com/chromium/src/+/f34fbb504afba2fa86f1dd7bbfd90e0134cbe639

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : Refactor for test #

Total comments: 8

Patch Set 4 : Refactor for test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -55 lines) Patch
M chrome/browser/android/search_geolocation/search_geolocation_service.h View 1 2 3 7 chunks +24 lines, -16 lines 0 comments Download
M chrome/browser/android/search_geolocation/search_geolocation_service.cc View 1 2 3 13 chunks +78 lines, -39 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 19 (12 generated)
raymes
Hey Dom, I know you don't have any context on this stuff but could you ...
3 years, 11 months ago (2017-01-17 22:41:07 UTC) #4
dominickn
lgtm % nits https://codereview.chromium.org/2637953003/diff/40001/chrome/browser/android/search_geolocation/search_geolocation_service.cc File chrome/browser/android/search_geolocation/search_geolocation_service.cc (right): https://codereview.chromium.org/2637953003/diff/40001/chrome/browser/android/search_geolocation/search_geolocation_service.cc#newcode67 chrome/browser/android/search_geolocation/search_geolocation_service.cc:67: return url::Origin(origin_url); Nit: this seems to ...
3 years, 11 months ago (2017-01-18 00:11:18 UTC) #5
raymes
https://codereview.chromium.org/2637953003/diff/40001/chrome/browser/android/search_geolocation/search_geolocation_service.cc File chrome/browser/android/search_geolocation/search_geolocation_service.cc (right): https://codereview.chromium.org/2637953003/diff/40001/chrome/browser/android/search_geolocation/search_geolocation_service.cc#newcode67 chrome/browser/android/search_geolocation/search_geolocation_service.cc:67: return url::Origin(origin_url); On 2017/01/18 00:11:18, dominickn wrote: > Nit: ...
3 years, 11 months ago (2017-01-18 04:07:24 UTC) #6
raymes
+dfalcantara for OWNERS
3 years, 11 months ago (2017-01-18 04:08:58 UTC) #8
gone
rs lgtm
3 years, 11 months ago (2017-01-19 18:02:05 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2637953003/60001
3 years, 11 months ago (2017-01-22 21:44:44 UTC) #16
commit-bot: I haz the power
3 years, 11 months ago (2017-01-22 22:40:58 UTC) #19
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/f34fbb504afba2fa86f1dd7bbfd9...

Powered by Google App Engine
This is Rietveld 408576698