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

Issue 115733007: Fix non-otr profile's file manager being launched in guest mode. (Closed)

Created:
7 years ago by tbarzic
Modified:
6 years, 11 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, sadrul, nkostylev+watch_chromium.org, rginda+watch_chromium.org, ben+ash_chromium.org, oshima+watch_chromium.org, kalyank, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, DaveMoore, Elliot Glaysher, rpetterson
Visibility:
Public.

Description

Fix non-otr profile's file manager being launched in guest mode. There are two issues: 1. App laucher uses the active profile's original profile to determine if we're in guest mode (and thus always assuming guest session is not active). 2. Every file manager event router (each profile has one) opening a file manager window when removable device is inserted. So the original profile's event router will open a window too. BUG=329658 TEST= 1. Login as guest, launch file manager from the app launcher, open a doc file from the file manager using quick office, and verify the doc is opened in off the record window (Ctrl-T should open guest tab). 2. Login as guest, insert an SD card, make sure only 1 file manager window is opened. From the opened file manager window, open a doc file using quick office and make sure the document is opened in off the record window. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243474

Patch Set 1 #

Total comments: 4

Patch Set 2 : check for creating browser and app windows #

Patch Set 3 : forgot to remove code used to verify checks catch the bug :) #

Patch Set 4 : #

Patch Set 5 : . #

Total comments: 6

Patch Set 6 : rebase #

Patch Set 7 : some extra comments #

Patch Set 8 : rebased #

Total comments: 2

Patch Set 9 : profile->IsGuestSession instead of checking cmd line #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -7 lines) Patch
M apps/shell_window.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_manager/event_router.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_syncable_service.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_syncable_service_factory.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc View 1 2 3 4 5 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
tbarzic
derat: owner for c/b/u/ash kinaba: owner for c/b/c/e/file_manager dpolukhin,skuhne: fyi
7 years ago (2013-12-19 20:12:14 UTC) #1
Dmitry Polukhin
lgtm
7 years ago (2013-12-19 20:14:24 UTC) #2
Daniel Erat
https://codereview.chromium.org/115733007/diff/1/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc File chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc (right): https://codereview.chromium.org/115733007/diff/1/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc#newcode339 chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc:339: active_profile->GetOriginalProfile(); what does GetOriginalProfile() return if we're in guest ...
7 years ago (2013-12-19 20:25:54 UTC) #3
tbarzic
https://codereview.chromium.org/115733007/diff/1/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc File chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc (right): https://codereview.chromium.org/115733007/diff/1/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc#newcode339 chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc:339: active_profile->GetOriginalProfile(); On 2013/12/19 20:25:54, Daniel Erat wrote: > what ...
7 years ago (2013-12-19 20:50:30 UTC) #4
Daniel Erat
On 2013/12/19 20:50:30, tbarzic wrote: > https://codereview.chromium.org/115733007/diff/1/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc > File chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc (right): > > https://codereview.chromium.org/115733007/diff/1/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc#newcode339 > ...
7 years ago (2013-12-19 20:59:58 UTC) #5
Dmitry Polukhin
On 2013/12/19 20:59:58, Daniel Erat wrote: > is there an issue tracking this? having a ...
7 years ago (2013-12-19 21:04:55 UTC) #6
Daniel Erat
On 2013/12/19 21:04:55, Dmitry Polukhin wrote: > On 2013/12/19 20:59:58, Daniel Erat wrote: > > ...
7 years ago (2013-12-19 21:10:12 UTC) #7
Mr4D (OOO till 08-26)
I agree with derat. I suggested earlier already that we might want to ignore the ...
7 years ago (2013-12-19 21:11:47 UTC) #8
Daniel Erat
(cc-ing profiles owners to see if they have opinions about this) https://codereview.chromium.org/115733007/diff/1/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc File chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc (right): ...
7 years ago (2013-12-19 21:13:52 UTC) #9
rpetterson
https://codereview.chromium.org/115733007/diff/1/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc File chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc (right): https://codereview.chromium.org/115733007/diff/1/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc#newcode339 chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc:339: active_profile->GetOriginalProfile(); To my knowledge, you cannot create an incognito ...
7 years ago (2013-12-19 21:28:15 UTC) #10
Daniel Erat
after discussion with dpolukhin, skuhne, and abodenha: could you also add a check somewhere in ...
7 years ago (2013-12-19 21:33:52 UTC) #11
kinaba
lgtm for file_manager/event_router
7 years ago (2013-12-20 01:37:40 UTC) #12
tbarzic
+stevenjb I added some checks, and found another case where app is launched with wrong ...
7 years ago (2013-12-20 20:08:36 UTC) #13
Daniel Erat
thanks! lgtm for ash
7 years ago (2013-12-20 20:42:38 UTC) #14
Mr4D (OOO till 08-26)
lgtm (chrome_launcher_controller)
7 years ago (2013-12-20 20:52:28 UTC) #15
tbarzic
Adding some owners ben: chrome/browser/ui/browser.cc benwells: app/ and chrome/browser/ui/app_list/
7 years ago (2013-12-20 21:19:12 UTC) #16
Ben Goodger (Google)
browser.cc lgtm
7 years ago (2013-12-20 21:27:19 UTC) #17
stevenjb
lgtm if comments are added / questions addressed. https://codereview.chromium.org/115733007/diff/110001/chrome/browser/ui/app_list/app_list_syncable_service.cc File chrome/browser/ui/app_list/app_list_syncable_service.cc (right): https://codereview.chromium.org/115733007/diff/110001/chrome/browser/ui/app_list/app_list_syncable_service.cc#newcode125 chrome/browser/ui/app_list/app_list_syncable_service.cc:125: if ...
6 years, 12 months ago (2013-12-26 22:34:16 UTC) #18
tbarzic
https://codereview.chromium.org/115733007/diff/110001/chrome/browser/ui/app_list/app_list_syncable_service.cc File chrome/browser/ui/app_list/app_list_syncable_service.cc (right): https://codereview.chromium.org/115733007/diff/110001/chrome/browser/ui/app_list/app_list_syncable_service.cc#newcode125 chrome/browser/ui/app_list/app_list_syncable_service.cc:125: if (!profile_->IsOffTheRecord() && On 2013/12/26 22:34:17, stevenjb wrote: > ...
6 years, 12 months ago (2013-12-27 22:35:37 UTC) #19
Dmitry Polukhin
Tony, please commit your changes ASAP. We have related regression on trunk, see https://code.google.com/p/chromium/issues/detail?id=331208
6 years, 11 months ago (2014-01-06 16:27:03 UTC) #20
benwells
lgtm with a maybe nit. https://codereview.chromium.org/115733007/diff/360001/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc File chrome/browser/ui/app_list/app_list_syncable_service_factory.cc (right): https://codereview.chromium.org/115733007/diff/360001/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc#newcode66 chrome/browser/ui/app_list/app_list_syncable_service_factory.cc:66: Profile* profile = static_cast<Profile*>(context); ...
6 years, 11 months ago (2014-01-07 22:46:29 UTC) #21
tbarzic
https://codereview.chromium.org/115733007/diff/360001/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc File chrome/browser/ui/app_list/app_list_syncable_service_factory.cc (right): https://codereview.chromium.org/115733007/diff/360001/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc#newcode66 chrome/browser/ui/app_list/app_list_syncable_service_factory.cc:66: Profile* profile = static_cast<Profile*>(context); On 2014/01/07 22:46:30, benwells wrote: ...
6 years, 11 months ago (2014-01-07 23:24:28 UTC) #22
benwells
On 2014/01/07 23:24:28, tbarzic wrote: > https://codereview.chromium.org/115733007/diff/360001/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc > File chrome/browser/ui/app_list/app_list_syncable_service_factory.cc (right): > > https://codereview.chromium.org/115733007/diff/360001/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc#newcode66 > ...
6 years, 11 months ago (2014-01-07 23:25:17 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tbarzic@chromium.org/115733007/460001
6 years, 11 months ago (2014-01-07 23:28:59 UTC) #24
commit-bot: I haz the power
6 years, 11 months ago (2014-01-08 02:46:36 UTC) #25
Message was sent while issue was closed.
Change committed as 243474

Powered by Google App Engine
This is Rietveld 408576698