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

Issue 2382023003: Optimize ShouldLaunchIncognito() since its on the startup path. (Closed)

Created:
4 years, 2 months ago by Alexei Svitkine (slow)
Modified:
4 years, 2 months ago
Reviewers:
robliao, gab
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Optimize ShouldLaunchIncognito() since its on the startup path. Sampling profiler data shows this takes 10ms on the startup path, mainly due to querying parental controls. Since we only need to check parental controls if the incognito flag was specified on the command line, the code is refactored to only query them in that case. BUG=651848 Committed: https://crrev.com/b62d7d9eec9d9d49d7d2d50bc3fb08f1a4d1880e Cr-Commit-Position: refs/heads/master@{#422532}

Patch Set 1 #

Total comments: 15

Patch Set 2 : Address comments. #

Total comments: 10

Patch Set 3 : Address gab's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -15 lines) Patch
M chrome/browser/prefs/incognito_mode_prefs.h View 1 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/prefs/incognito_mode_prefs.cc View 1 2 3 chunks +29 lines, -15 lines 0 comments Download

Messages

Total messages: 34 (18 generated)
Alexei Svitkine (slow)
robliao: Please review since you've done some work on this code before. gab: Please review ...
4 years, 2 months ago (2016-09-30 16:57:02 UTC) #10
robliao
It's surprising to me that this is still showing up on the sampler. IncognitoModePrefs.WindowsParentalControlsInitThread suggests ...
4 years, 2 months ago (2016-09-30 17:43:46 UTC) #13
Alexei Svitkine (slow)
Here's an example view of the UMA data from dev: https://uma.googleplex.com/callstacks?sid=43940bb8d887d5488d27a4695c23ff0d That one shows 8ms ...
4 years, 2 months ago (2016-09-30 17:51:15 UTC) #14
robliao
> Here's an example view of the UMA data from dev: > https://uma.googleplex.com/callstacks?sid=43940bb8d887d5488d27a4695c23ff0d > That ...
4 years, 2 months ago (2016-09-30 18:26:13 UTC) #15
gab
Second comment is most important (likely superseeds other two). https://codereview.chromium.org/2382023003/diff/40001/chrome/browser/prefs/incognito_mode_prefs.cc File chrome/browser/prefs/incognito_mode_prefs.cc (right): https://codereview.chromium.org/2382023003/diff/40001/chrome/browser/prefs/incognito_mode_prefs.cc#newcode169 chrome/browser/prefs/incognito_mode_prefs.cc:169: ...
4 years, 2 months ago (2016-09-30 18:47:20 UTC) #16
Alexei Svitkine (slow)
https://codereview.chromium.org/2382023003/diff/40001/chrome/browser/prefs/incognito_mode_prefs.cc File chrome/browser/prefs/incognito_mode_prefs.cc (right): https://codereview.chromium.org/2382023003/diff/40001/chrome/browser/prefs/incognito_mode_prefs.cc#newcode172 chrome/browser/prefs/incognito_mode_prefs.cc:172: return GetAvailabilityInternal(prefs, false) == IncognitoModePrefs::FORCED; On 2016/09/30 18:47:20, gab ...
4 years, 2 months ago (2016-09-30 18:55:09 UTC) #17
Alexei Svitkine (slow)
Thanks, comments addressed - PTAL! https://codereview.chromium.org/2382023003/diff/40001/chrome/browser/prefs/incognito_mode_prefs.cc File chrome/browser/prefs/incognito_mode_prefs.cc (right): https://codereview.chromium.org/2382023003/diff/40001/chrome/browser/prefs/incognito_mode_prefs.cc#newcode145 chrome/browser/prefs/incognito_mode_prefs.cc:145: return GetAvailabilityInternal(pref_service, true); On ...
4 years, 2 months ago (2016-09-30 20:16:17 UTC) #18
Alexei Svitkine (slow)
Friendly ping!
4 years, 2 months ago (2016-10-03 15:49:26 UTC) #19
gab
lgtm % nits https://codereview.chromium.org/2382023003/diff/40001/chrome/browser/prefs/incognito_mode_prefs.cc File chrome/browser/prefs/incognito_mode_prefs.cc (right): https://codereview.chromium.org/2382023003/diff/40001/chrome/browser/prefs/incognito_mode_prefs.cc#newcode218 chrome/browser/prefs/incognito_mode_prefs.cc:218: IncognitoModePrefs::Availability IncognitoModePrefs::GetAvailabilityInternal( On 2016/09/30 20:16:16, Alexei ...
4 years, 2 months ago (2016-10-03 17:08:12 UTC) #20
Alexei Svitkine (slow)
Thanks! Rob, I'll wait for your lg as well. https://codereview.chromium.org/2382023003/diff/60001/chrome/browser/prefs/incognito_mode_prefs.cc File chrome/browser/prefs/incognito_mode_prefs.cc (right): https://codereview.chromium.org/2382023003/diff/60001/chrome/browser/prefs/incognito_mode_prefs.cc#newcode167 chrome/browser/prefs/incognito_mode_prefs.cc:167: ...
4 years, 2 months ago (2016-10-03 18:57:39 UTC) #21
gab
https://codereview.chromium.org/2382023003/diff/60001/chrome/browser/prefs/incognito_mode_prefs.h File chrome/browser/prefs/incognito_mode_prefs.h (right): https://codereview.chromium.org/2382023003/diff/60001/chrome/browser/prefs/incognito_mode_prefs.h#newcode82 chrome/browser/prefs/incognito_mode_prefs.h:82: enum GetAvailabilityMode { On 2016/10/03 18:57:39, Alexei Svitkine (slow) ...
4 years, 2 months ago (2016-10-03 19:05:57 UTC) #22
Alexei Svitkine (slow)
https://codereview.chromium.org/2382023003/diff/60001/chrome/browser/prefs/incognito_mode_prefs.h File chrome/browser/prefs/incognito_mode_prefs.h (right): https://codereview.chromium.org/2382023003/diff/60001/chrome/browser/prefs/incognito_mode_prefs.h#newcode82 chrome/browser/prefs/incognito_mode_prefs.h:82: enum GetAvailabilityMode { On 2016/10/03 19:05:57, gab wrote: > ...
4 years, 2 months ago (2016-10-03 19:25:36 UTC) #23
robliao
lgtm. Enum looks fine to me. Thanks!
4 years, 2 months ago (2016-10-03 20:54:18 UTC) #26
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/2382023003/80001
4 years, 2 months ago (2016-10-03 21:08:43 UTC) #31
commit-bot: I haz the power
Committed patchset #3 (id:80001)
4 years, 2 months ago (2016-10-03 21:15:22 UTC) #32
commit-bot: I haz the power
4 years, 2 months ago (2016-10-03 21:19:13 UTC) #34
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/b62d7d9eec9d9d49d7d2d50bc3fb08f1a4d1880e
Cr-Commit-Position: refs/heads/master@{#422532}

Powered by Google App Engine
This is Rietveld 408576698