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

Issue 1212163011: Componentize chrome/browser/rlz (Closed)

Created:
5 years, 5 months ago by sdefresne
Modified:
5 years, 5 months ago
CC:
chromium-reviews, davemoore+watch_chromium.org, dzhioev+watch_chromium.org, Matt Giuca, oshima+watch_chromium.org, stevenjb+watch_chromium.org, tapted, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Componentize chrome/browser/rlz Add new class RLZTrackerDelegate that abstract access to embedder specific singletons and informations and provide an implementation for Chrome based on the previous implementation. Split rlz_unittest.cc in tests of the RLZTracker and Chrome implementation of the RLZTrackerDelegate interface and move the RLZTracker tests into the component. Add a new gyp/gn variable "enable_rlz_support". This variable is true on the platforms that support RLZ (currently Windows, Mac, iOS and ChromeOS). Use it to build library and unit tests even when the RLZ support is not enabled in the Chrome binary (this is still controlled by "enable_rlz" and depends on the branding). Enable the tests on iOS and convert rlz_tracker_ios.mm to a C++ file. TEST=Run unit_tests and components_unittests on a platform that supports RLZ (Windows, Mac, iOS or ChromeOS) and check that they pass. Then build Chrome with "enable_rlz" and manually checks that RLZ are sent with searches as expected. BUG=504841, 508148 Committed: https://crrev.com/d967d55cf7a0f78e6ace9ec681d2d082e631810b Cr-Commit-Position: refs/heads/master@{#339002}

Patch Set 1 #

Patch Set 2 : Revert "enable_rlz" override #

Patch Set 3 : Fix compilation with gn #

Total comments: 8

Patch Set 4 : Address comments, move into rlz namespace, convert NULL to nullptr #

Patch Set 5 : Add dependencies to fix build failures #

Patch Set 6 : Fix typo in kHomepageFirstSearch, call correct callback registration to fix unit tests #

Patch Set 7 : Fix "gn gen ..." #

Patch Set 8 : Rebase #

Patch Set 9 : Rebase, round 2 #

Patch Set 10 : Rebase, round 3 (fixing gn build) #

Patch Set 11 : Fix unit_tests when RLZ is enabled #

Patch Set 12 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1155 lines, -2457 lines) Patch
M build/common.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -3 lines 0 comments Download
M build/config/features.gni View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +15 lines, -3 lines 0 comments Download
M chrome/browser/DEPS View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/browser_shutdown.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.cc View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/login_utils_browsertest.cc View 1 2 3 4 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/login/session/user_session_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +14 lines, -7 lines 0 comments Download
A chrome/browser/rlz/chrome_rlz_tracker_delegate.h View 1 2 3 4 5 6 7 8 9 1 chunk +56 lines, -0 lines 0 comments Download
A chrome/browser/rlz/chrome_rlz_tracker_delegate.cc View 1 2 3 4 5 6 7 8 1 chunk +236 lines, -0 lines 0 comments Download
A chrome/browser/rlz/chrome_rlz_tracker_delegate_unittest.cc View 1 chunk +48 lines, -0 lines 0 comments Download
D chrome/browser/rlz/rlz.h View 1 chunk +0 lines, -246 lines 0 comments Download
D chrome/browser/rlz/rlz.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -670 lines 0 comments Download
D chrome/browser/rlz/rlz_chromeos.cc View 1 chunk +0 lines, -20 lines 0 comments Download
D chrome/browser/rlz/rlz_ios.mm View 1 chunk +0 lines, -14 lines 0 comments Download
D chrome/browser/rlz/rlz_mac.cc View 1 chunk +0 lines, -20 lines 0 comments Download
D chrome/browser/rlz/rlz_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -925 lines 0 comments Download
D chrome/browser/rlz/rlz_win.cc View 1 chunk +0 lines, -20 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_factory.cc View 1 2 3 4 3 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/search_engines/ui_thread_search_terms_data.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_controller_delegate.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser_commands.cc View 1 2 3 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +22 lines, -8 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -4 lines 0 comments Download
M components/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M components/components.gyp View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +20 lines, -0 lines 0 comments Download
A components/rlz.gypi View 1 chunk +38 lines, -0 lines 0 comments Download
A components/rlz/BUILD.gn View 1 chunk +42 lines, -0 lines 0 comments Download
A components/rlz/DEPS View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
A + components/rlz/OWNERS View 0 chunks +-1 lines, --1 lines 0 comments Download
A + components/rlz/rlz_tracker.h View 1 2 3 8 chunks +35 lines, -39 lines 0 comments Download
A + components/rlz/rlz_tracker.cc View 1 2 3 4 5 6 7 8 9 10 19 chunks +121 lines, -226 lines 0 comments Download
A + components/rlz/rlz_tracker_chromeos.cc View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
A components/rlz/rlz_tracker_delegate.h View 1 2 3 1 chunk +86 lines, -0 lines 0 comments Download
A + components/rlz/rlz_tracker_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -5 lines 0 comments Download
A components/rlz/rlz_tracker_ios.cc View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
A + components/rlz/rlz_tracker_mac.cc View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
A + components/rlz/rlz_tracker_unittest.cc View 1 2 3 4 5 6 7 8 34 chunks +290 lines, -206 lines 0 comments Download
A + components/rlz/rlz_tracker_win.cc View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M rlz/test/rlz_test_helpers.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 49 (18 generated)
sdefresne
rogerta: please take a look 1. as OWNERS of chrome/browser/rlz & components/rlz 2. for new ...
5 years, 5 months ago (2015-07-01 15:59:40 UTC) #2
Roger Tawa OOO till Jul 10th
lgtm Thanks for the cleanup Sylvain. The one thing I wonder is if the tests ...
5 years, 5 months ago (2015-07-02 18:22:28 UTC) #3
sdefresne
Please take another look. https://codereview.chromium.org/1212163011/diff/40001/chrome/browser/rlz/chrome_rlz_tracker_delegate_unittest.cc File chrome/browser/rlz/chrome_rlz_tracker_delegate_unittest.cc (right): https://codereview.chromium.org/1212163011/diff/40001/chrome/browser/rlz/chrome_rlz_tracker_delegate_unittest.cc#newcode18 chrome/browser/rlz/chrome_rlz_tracker_delegate_unittest.cc:18: class ChromeRLZTrackerDelegateTest : public testing::Test ...
5 years, 5 months ago (2015-07-03 16:16:37 UTC) #4
Roger Tawa OOO till Jul 10th
still lgtm Thanks for building and running the tests all the time. In fact, I ...
5 years, 5 months ago (2015-07-03 17:25:20 UTC) #5
sdefresne
On 2015/07/03 at 17:25:20, rogerta wrote: > still lgtm > > Thanks for building and ...
5 years, 5 months ago (2015-07-06 14:06:46 UTC) #6
sdefresne
thakis: ping?
5 years, 5 months ago (2015-07-06 14:09:28 UTC) #7
sdefresne
Trying multiple OWNERS as root OWNERS were unresponsive. Can you each review the files highlighted? ...
5 years, 5 months ago (2015-07-07 08:09:54 UTC) #9
Paweł Hajdan Jr.
chrome/test LGTM
5 years, 5 months ago (2015-07-07 10:49:49 UTC) #10
cpu_(ooo_6.6-7.5)
I reviewed my files and they look good. Ping me at the end since my ...
5 years, 5 months ago (2015-07-07 17:08:04 UTC) #11
Peter Kasting
LGTM. It's also possible to TBR various owners when you're making minor, purely-mechanical changes to ...
5 years, 5 months ago (2015-07-07 18:43:03 UTC) #12
sdefresne
Removing OWNERS currently in vacation, and picking other OWNERS (xiyuan, jochen). Can you look at ...
5 years, 5 months ago (2015-07-08 11:26:49 UTC) #14
jochen (gone - plz use gerrit)
lgtm
5 years, 5 months ago (2015-07-08 13:24:14 UTC) #15
xiyuan
lgtm
5 years, 5 months ago (2015-07-08 14:39:20 UTC) #16
sdefresne
cpu: all other OWNERS have approved the CL, pinging you as requested.
5 years, 5 months ago (2015-07-08 14:42:29 UTC) #17
cpu_(ooo_6.6-7.5)
lgtm
5 years, 5 months ago (2015-07-08 18:21:08 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1212163011/120001
5 years, 5 months ago (2015-07-09 08:20:50 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/71348) ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 5 months ago (2015-07-09 08:23:10 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1212163011/140001
5 years, 5 months ago (2015-07-09 09:13:21 UTC) #26
commit-bot: I haz the power
Failed to apply patch for components/rlz/rlz_tracker.cc: While running git apply --index -3 -p1; error: patch ...
5 years, 5 months ago (2015-07-09 10:22:55 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1212163011/160001
5 years, 5 months ago (2015-07-09 12:52:35 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/55947)
5 years, 5 months ago (2015-07-09 13:02:56 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1212163011/180001
5 years, 5 months ago (2015-07-09 13:57:20 UTC) #37
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 5 months ago (2015-07-09 14:56:30 UTC) #38
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/311a46585ee5b77486ef42d947bc7cc7566558b1 Cr-Commit-Position: refs/heads/master@{#338040}
5 years, 5 months ago (2015-07-09 14:57:13 UTC) #39
Nico
This broke official builds like so: ..\..\chrome\browser\chrome_browser_main.cc(1461,33) : error(clang): no member named 'IsGoogleHomePage' in 'ChromeRLZTrackerDelegate'; ...
5 years, 5 months ago (2015-07-09 17:10:22 UTC) #41
Nico
It also broke tests in official builds. I'll revert. (The revert button doesn't work for ...
5 years, 5 months ago (2015-07-09 21:00:24 UTC) #42
sdefresne
rogerta: there were failure when running unit tests with RLZ enable after my changes. It ...
5 years, 5 months ago (2015-07-10 10:08:00 UTC) #43
Roger Tawa OOO till Jul 10th
patchset #11 lgtm
5 years, 5 months ago (2015-07-14 12:32:06 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1212163011/220001
5 years, 5 months ago (2015-07-16 07:58:19 UTC) #47
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 5 months ago (2015-07-16 08:34:47 UTC) #48
commit-bot: I haz the power
5 years, 5 months ago (2015-07-16 08:35:47 UTC) #49
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/d967d55cf7a0f78e6ace9ec681d2d082e631810b
Cr-Commit-Position: refs/heads/master@{#339002}

Powered by Google App Engine
This is Rietveld 408576698