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

Issue 2819713002: Create TetherService, a TetherAllowed pref, and use DependencyManager for RegisterProfilePrefs call… (Closed)

Created:
3 years, 8 months ago by Ryan Hansberry
Modified:
3 years, 8 months ago
CC:
chromium-reviews, alemate+watch_chromium.org, achuith+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org, James Hawkins, Jeremy Klein
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Create TetherService, a TetherAllowed pref, and use DependencyManager for RegisterProfilePrefs calls. TetherService dynamically starts and stops Tether when prefs::kTetherAllowed changes value (from policy changing). This is expected from policy settings in Chrome. Please see: https://sites.google.com/a/chromium.org/dev/developers/how-tos/enterprise/adding-new-policies. This CL also tweaks EasyUnlockServiceFactory and ChromeCryptAuthServiceFactory to call RegisterProfilePrefs on their respective services. These calls are automagically handled by DependencyManager: it ensures that the RegisterProfilePrefs calls are made in the correct order and only once per context. A subsequent CL will come after this one that actually creates the enterprise policy for Tether, and maps to prefs::kTetherAllowed. BUG=710174 Review-Url: https://codereview.chromium.org/2819713002 Cr-Commit-Position: refs/heads/master@{#466702} Committed: https://chromium.googlesource.com/chromium/src/+/8d01f3ac9dad3f4833d868e253989ed88b705d1c

Patch Set 1 #

Total comments: 16

Patch Set 2 : Change pref name from TetherAllowed to InstantTetheringAllowed. #

Patch Set 3 : Add TetherService::Shutdown() call in UserSessionManager::Shutdown(). #

Patch Set 4 : Do not explicitly call on TetherService::Shutdown() from UserSessionManager. #

Total comments: 33

Patch Set 5 : battre@ comments. #

Patch Set 6 : thestig@ comments. #

Patch Set 7 : thestig@ comments. #

Patch Set 8 : Move TetherService[Factory] from chrome/browser to chrome/browser/chromeos. #

Total comments: 2

Patch Set 9 : Create an IsEnabled method on TetherService. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -37 lines) Patch
M chrome/browser/chromeos/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/session/user_session_manager.cc View 1 2 3 4 5 6 7 5 chunks +2 lines, -23 lines 0 comments Download
A chrome/browser/chromeos/tether/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +17 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/tether/DEPS View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/tether/OWNERS View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/tether/tether_service.h View 1 2 3 4 5 6 7 8 1 chunk +58 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/tether/tether_service.cc View 1 2 3 4 5 6 7 8 1 chunk +92 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/tether/tether_service_factory.h View 1 2 3 4 5 6 7 1 chunk +44 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/tether/tether_service_factory.cc View 1 2 3 4 5 6 7 1 chunk +44 lines, -0 lines 0 comments Download
M chrome/browser/cryptauth/chrome_cryptauth_service_factory.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/cryptauth/chrome_cryptauth_service_factory.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 chunks +0 lines, -14 lines 0 comments Download
M chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/signin/easy_unlock_service_factory.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/signin/easy_unlock_service_factory.cc View 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 53 (23 generated)
Ryan Hansberry
3 years, 8 months ago (2017-04-13 23:19:49 UTC) #4
Kyle Horimoto
https://codereview.chromium.org/2819713002/diff/1/chrome/browser/chromeos/login/session/user_session_manager.cc File chrome/browser/chromeos/login/session/user_session_manager.cc (left): https://codereview.chromium.org/2819713002/diff/1/chrome/browser/chromeos/login/session/user_session_manager.cc#oldcode1947 chrome/browser/chromeos/login/session/user_session_manager.cc:1947: if (base::CommandLine::ForCurrentProcess()->HasSwitch( When will Shutdown() be called now? Are ...
3 years, 8 months ago (2017-04-14 00:15:43 UTC) #5
Kyle Horimoto
https://codereview.chromium.org/2819713002/diff/1/chrome/browser/tether/tether_service.cc File chrome/browser/tether/tether_service.cc (right): https://codereview.chromium.org/2819713002/diff/1/chrome/browser/tether/tether_service.cc#newcode71 chrome/browser/tether/tether_service.cc:71: if (!profile_->GetPrefs()->GetBoolean(prefs::kTetherAllowed)) Just return profile_->GetPrefs()->GetBoolean(prefs::kTetherAllowed) instead of using if/else. ...
3 years, 8 months ago (2017-04-14 01:08:27 UTC) #6
Ryan Hansberry
https://codereview.chromium.org/2819713002/diff/1/chrome/browser/chromeos/login/session/user_session_manager.cc File chrome/browser/chromeos/login/session/user_session_manager.cc (left): https://codereview.chromium.org/2819713002/diff/1/chrome/browser/chromeos/login/session/user_session_manager.cc#oldcode1947 chrome/browser/chromeos/login/session/user_session_manager.cc:1947: if (base::CommandLine::ForCurrentProcess()->HasSwitch( On 2017/04/14 00:15:43, Kyle Horimoto wrote: > ...
3 years, 8 months ago (2017-04-14 02:34:10 UTC) #7
Elliot Glaysher
profiles lgtm
3 years, 8 months ago (2017-04-14 17:34:49 UTC) #8
Kyle Horimoto
https://codereview.chromium.org/2819713002/diff/1/chrome/browser/chromeos/login/session/user_session_manager.cc File chrome/browser/chromeos/login/session/user_session_manager.cc (left): https://codereview.chromium.org/2819713002/diff/1/chrome/browser/chromeos/login/session/user_session_manager.cc#oldcode1947 chrome/browser/chromeos/login/session/user_session_manager.cc:1947: if (base::CommandLine::ForCurrentProcess()->HasSwitch( On 2017/04/14 02:34:10, Ryan Hansberry wrote: > ...
3 years, 8 months ago (2017-04-14 18:39:20 UTC) #9
Ryan Hansberry
https://codereview.chromium.org/2819713002/diff/1/chrome/browser/chromeos/login/session/user_session_manager.cc File chrome/browser/chromeos/login/session/user_session_manager.cc (left): https://codereview.chromium.org/2819713002/diff/1/chrome/browser/chromeos/login/session/user_session_manager.cc#oldcode1947 chrome/browser/chromeos/login/session/user_session_manager.cc:1947: if (base::CommandLine::ForCurrentProcess()->HasSwitch( On 2017/04/14 18:39:20, Kyle Horimoto wrote: > ...
3 years, 8 months ago (2017-04-18 17:59:05 UTC) #10
Tim Song
lgtm
3 years, 8 months ago (2017-04-18 19:08:44 UTC) #11
Ryan Hansberry
https://codereview.chromium.org/2819713002/diff/1/chrome/browser/chromeos/login/session/user_session_manager.cc File chrome/browser/chromeos/login/session/user_session_manager.cc (left): https://codereview.chromium.org/2819713002/diff/1/chrome/browser/chromeos/login/session/user_session_manager.cc#oldcode1947 chrome/browser/chromeos/login/session/user_session_manager.cc:1947: if (base::CommandLine::ForCurrentProcess()->HasSwitch( On 2017/04/18 17:59:05, Ryan Hansberry wrote: > ...
3 years, 8 months ago (2017-04-18 21:59:53 UTC) #12
Kyle Horimoto
3 years, 8 months ago (2017-04-18 22:03:37 UTC) #13
Kyle Horimoto
lgtm
3 years, 8 months ago (2017-04-18 22:03:44 UTC) #14
battre
\o/ LGTM Thanks. https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/chromeos/login/session/user_session_manager.cc File chrome/browser/chromeos/login/session/user_session_manager.cc (right): https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/chromeos/login/session/user_session_manager.cc#newcode1230 chrome/browser/chromeos/login/session/user_session_manager.cc:1230: if (tether_service) { nit: {} are ...
3 years, 8 months ago (2017-04-19 08:43:30 UTC) #15
Ryan Hansberry
Added thestig@ for chrome/browser/ review. https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/chromeos/login/session/user_session_manager.cc File chrome/browser/chromeos/login/session/user_session_manager.cc (right): https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/chromeos/login/session/user_session_manager.cc#newcode1230 chrome/browser/chromeos/login/session/user_session_manager.cc:1230: if (tether_service) { On ...
3 years, 8 months ago (2017-04-19 17:46:06 UTC) #18
Lei Zhang
Can you remove messages to reviewers from the CL description?
3 years, 8 months ago (2017-04-19 19:01:43 UTC) #19
Lei Zhang
https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/BUILD.gn File chrome/browser/BUILD.gn (right): https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/BUILD.gn#newcode3578 chrome/browser/BUILD.gn:3578: "tether/tether_service.cc", Is this going to build on Windows/Mac/Linux too? ...
3 years, 8 months ago (2017-04-19 19:13:17 UTC) #20
Ryan Hansberry
Removed notes to reviewers in CL description. https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/BUILD.gn File chrome/browser/BUILD.gn (right): https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/BUILD.gn#newcode3578 chrome/browser/BUILD.gn:3578: "tether/tether_service.cc", On ...
3 years, 8 months ago (2017-04-20 17:22:32 UTC) #22
Lei Zhang
Not sure why you are not running tryjobs. I will kick off a run for ...
3 years, 8 months ago (2017-04-20 19:17:14 UTC) #23
Lei Zhang
https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/BUILD.gn File chrome/browser/BUILD.gn (right): https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/BUILD.gn#newcode3578 chrome/browser/BUILD.gn:3578: "tether/tether_service.cc", On 2017/04/20 17:22:32, Ryan Hansberry wrote: > On ...
3 years, 8 months ago (2017-04-20 19:24:30 UTC) #26
Lei Zhang
https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/tether/OWNERS File chrome/browser/tether/OWNERS (right): https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/tether/OWNERS#newcode2 chrome/browser/tether/OWNERS:2: hansberry@chromium.org On 2017/04/20 17:22:32, Ryan Hansberry wrote: > On ...
3 years, 8 months ago (2017-04-20 19:26:21 UTC) #27
Ryan Hansberry
https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/BUILD.gn File chrome/browser/BUILD.gn (right): https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/BUILD.gn#newcode3578 chrome/browser/BUILD.gn:3578: "tether/tether_service.cc", On 2017/04/20 19:24:30, Lei Zhang wrote: > On ...
3 years, 8 months ago (2017-04-20 22:08:09 UTC) #30
Lei Zhang
Still need to upload a new patch set. https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/BUILD.gn File chrome/browser/BUILD.gn (right): https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/BUILD.gn#newcode3578 chrome/browser/BUILD.gn:3578: "tether/tether_service.cc", ...
3 years, 8 months ago (2017-04-20 22:11:43 UTC) #33
Lei Zhang
On 2017/04/20 22:11:43, Lei Zhang wrote: > Why not just rename the file so it ...
3 years, 8 months ago (2017-04-20 22:13:03 UTC) #34
Ryan Hansberry
Sorry, forgot to upload changelist. https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/BUILD.gn File chrome/browser/BUILD.gn (right): https://codereview.chromium.org/2819713002/diff/60001/chrome/browser/BUILD.gn#newcode3578 chrome/browser/BUILD.gn:3578: "tether/tether_service.cc", On 2017/04/20 22:11:43, ...
3 years, 8 months ago (2017-04-20 22:26:45 UTC) #37
Lei Zhang
On 2017/04/20 22:26:45, Ryan Hansberry wrote: > What's the preferred situation: > > 1) Place ...
3 years, 8 months ago (2017-04-20 22:45:12 UTC) #38
Ryan Hansberry
I've now moved the TetherService and its factory under chrome/browser/chromeos. Steven can you please take ...
3 years, 8 months ago (2017-04-20 23:07:25 UTC) #40
Lei Zhang
lgtm
3 years, 8 months ago (2017-04-21 05:23:25 UTC) #43
stevenjb
lgtm w/ one suggestion https://codereview.chromium.org/2819713002/diff/140001/chrome/browser/chromeos/tether/tether_service.cc File chrome/browser/chromeos/tether/tether_service.cc (right): https://codereview.chromium.org/2819713002/diff/140001/chrome/browser/chromeos/tether/tether_service.cc#newcode84 chrome/browser/chromeos/tether/tether_service.cc:84: chromeos::switches::kEnableTether)) { We should just ...
3 years, 8 months ago (2017-04-21 20:09:17 UTC) #46
Ryan Hansberry
https://codereview.chromium.org/2819713002/diff/140001/chrome/browser/chromeos/tether/tether_service.cc File chrome/browser/chromeos/tether/tether_service.cc (right): https://codereview.chromium.org/2819713002/diff/140001/chrome/browser/chromeos/tether/tether_service.cc#newcode84 chrome/browser/chromeos/tether/tether_service.cc:84: chromeos::switches::kEnableTether)) { On 2017/04/21 20:09:17, stevenjb wrote: > We ...
3 years, 8 months ago (2017-04-24 17:53:09 UTC) #47
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/2819713002/160001
3 years, 8 months ago (2017-04-24 17:54:11 UTC) #50
commit-bot: I haz the power
3 years, 8 months ago (2017-04-24 18:59:10 UTC) #53
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/8d01f3ac9dad3f4833d868e25398...

Powered by Google App Engine
This is Rietveld 408576698