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

Issue 55423004: Enable Google Drive offline mode automatically on first run. (Closed)

Created:
7 years, 1 month ago by Tim Song
Modified:
7 years, 1 month ago
CC:
chromium-reviews, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, oshima+watch_chromium.org, nkostylev+watch_chromium.org
Visibility:
Public.

Description

Add flow to enable Google Drive offline mode automatically on first run. How this works is that we create a WebContents in the background to a Drive endpoint that will take care of all the offline initialization for the app. We succeed if a background page is opened; otherwise, we fail if the page does not load or after a timeout. BUG=307302 TEST=manual Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=233501

Patch Set 1 #

Total comments: 26

Patch Set 2 : review fixes #

Patch Set 3 : rename flag #

Patch Set 4 : Renamed to DriveFirstRunController #

Total comments: 19

Patch Set 5 : Fixes #

Total comments: 6

Patch Set 6 : rename opt-in names #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+401 lines, -0 lines) Patch
A chrome/browser/chromeos/first_run/drive_first_run_controller.h View 1 2 3 4 5 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/first_run/drive_first_run_controller.cc View 1 2 3 4 5 1 chunk +335 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/login_display_host_impl.cc View 1 2 3 4 5 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chromeos/chromeos_switches.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/chromeos_switches.cc View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
Tim Song
Please take a look, Achuith.
7 years, 1 month ago (2013-11-01 02:09:37 UTC) #1
achuithb
First round. I'll take a closer look in the afternoon. https://codereview.chromium.org/55423004/diff/1/chrome/browser/chromeos/first_run/drive_opt_in_controller.cc File chrome/browser/chromeos/first_run/drive_opt_in_controller.cc (right): https://codereview.chromium.org/55423004/diff/1/chrome/browser/chromeos/first_run/drive_opt_in_controller.cc#newcode53 ...
7 years, 1 month ago (2013-11-01 19:25:14 UTC) #2
Tim Song
https://codereview.chromium.org/55423004/diff/1/chrome/browser/chromeos/first_run/drive_opt_in_controller.cc File chrome/browser/chromeos/first_run/drive_opt_in_controller.cc (right): https://codereview.chromium.org/55423004/diff/1/chrome/browser/chromeos/first_run/drive_opt_in_controller.cc#newcode53 chrome/browser/chromeos/first_run/drive_opt_in_controller.cc:53: // mode. If successful, a background page will be ...
7 years, 1 month ago (2013-11-02 00:13:14 UTC) #3
Tim Song
I renamed the class to DriveFirstRunController to avoid the potential memetastic consequences. Please take another ...
7 years, 1 month ago (2013-11-04 17:57:55 UTC) #4
achuithb
https://codereview.chromium.org/55423004/diff/130001/chrome/browser/chromeos/first_run/drive_first_run_controller.cc File chrome/browser/chromeos/first_run/drive_first_run_controller.cc (right): https://codereview.chromium.org/55423004/diff/130001/chrome/browser/chromeos/first_run/drive_first_run_controller.cc#newcode60 chrome/browser/chromeos/first_run/drive_first_run_controller.cc:60: typedef base::Callback<void(bool)> DoneCallback; CompletionCallback? https://codereview.chromium.org/55423004/diff/130001/chrome/browser/chromeos/first_run/drive_first_run_controller.cc#newcode67 chrome/browser/chromeos/first_run/drive_first_run_controller.cc:67: void StartLoad(); Please ...
7 years, 1 month ago (2013-11-04 20:33:24 UTC) #5
Tim Song
https://codereview.chromium.org/55423004/diff/130001/chrome/browser/chromeos/first_run/drive_first_run_controller.cc File chrome/browser/chromeos/first_run/drive_first_run_controller.cc (right): https://codereview.chromium.org/55423004/diff/130001/chrome/browser/chromeos/first_run/drive_first_run_controller.cc#newcode60 chrome/browser/chromeos/first_run/drive_first_run_controller.cc:60: typedef base::Callback<void(bool)> DoneCallback; On 2013/11/04 20:33:24, achuith.bhandarkar wrote: > ...
7 years, 1 month ago (2013-11-05 01:18:06 UTC) #6
achuithb
https://codereview.chromium.org/55423004/diff/130001/chrome/browser/chromeos/login/login_display_host_impl.cc File chrome/browser/chromeos/login/login_display_host_impl.cc (right): https://codereview.chromium.org/55423004/diff/130001/chrome/browser/chromeos/login/login_display_host_impl.cc#newcode302 chrome/browser/chromeos/login/login_display_host_impl.cc:302: #if defined(GOOGLE_CHROME_BUILD) On 2013/11/05 01:18:06, Tim Song wrote: > ...
7 years, 1 month ago (2013-11-05 01:23:06 UTC) #7
achuithb
https://codereview.chromium.org/55423004/diff/210001/chrome/browser/chromeos/first_run/drive_first_run_controller.cc File chrome/browser/chromeos/first_run/drive_first_run_controller.cc (right): https://codereview.chromium.org/55423004/diff/210001/chrome/browser/chromeos/first_run/drive_first_run_controller.cc#newcode64 chrome/browser/chromeos/first_run/drive_first_run_controller.cc:64: CompletionCallback completion_callback); const CompletionCallback& https://codereview.chromium.org/55423004/diff/210001/chrome/browser/chromeos/first_run/drive_first_run_controller.cc#newcode77 chrome/browser/chromeos/first_run/drive_first_run_controller.cc:77: void OnOptInDone(bool success); ...
7 years, 1 month ago (2013-11-05 01:30:47 UTC) #8
Tim Song
Changed patch description to remove opt-in references as well. https://codereview.chromium.org/55423004/diff/210001/chrome/browser/chromeos/first_run/drive_first_run_controller.cc File chrome/browser/chromeos/first_run/drive_first_run_controller.cc (right): https://codereview.chromium.org/55423004/diff/210001/chrome/browser/chromeos/first_run/drive_first_run_controller.cc#newcode64 chrome/browser/chromeos/first_run/drive_first_run_controller.cc:64: ...
7 years, 1 month ago (2013-11-05 01:49:51 UTC) #9
achuithb
lgtm. Thanks for taking care of the review comments.
7 years, 1 month ago (2013-11-05 09:04:58 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tengs@chromium.org/55423004/290001
7 years, 1 month ago (2013-11-05 22:55:43 UTC) #11
commit-bot: I haz the power
Failed to apply patch for chromeos/chromeos_switches.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 1 month ago (2013-11-05 22:55:47 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tengs@chromium.org/55423004/380001
7 years, 1 month ago (2013-11-05 23:16:44 UTC) #13
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=220139
7 years, 1 month ago (2013-11-06 01:13:50 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tengs@chromium.org/55423004/380001
7 years, 1 month ago (2013-11-06 01:50:44 UTC) #15
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=220327
7 years, 1 month ago (2013-11-06 06:04:05 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tengs@chromium.org/55423004/380001
7 years, 1 month ago (2013-11-06 18:22:52 UTC) #17
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 1 month ago (2013-11-06 18:40:18 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tengs@chromium.org/55423004/380001
7 years, 1 month ago (2013-11-06 22:04:15 UTC) #19
commit-bot: I haz the power
Change committed as 233501
7 years, 1 month ago (2013-11-07 06:18:14 UTC) #20
dzhioev (left Google)
On 2013/11/07 06:18:14, I haz the power (commit-bot) wrote: > Change committed as 233501 Hi ...
7 years, 1 month ago (2013-11-22 12:53:32 UTC) #21
Tim Song
7 years, 1 month ago (2013-11-22 18:14:46 UTC) #22
Message was sent while issue was closed.
Hi Pavel,

I was looking for a good place to put these files, and
"chrome/browser/chromeos/first_run" seemed like the best choice. Basically I
wanted to avoid a confusing namespace situation like between
"chrome/browser/chromeos/app_mode/" and "chrome/browser/chromeos/kiosk_mode". My
apologies, I should have consulted you about putting the files here, but I think
it's the right place to put it.

Because the Drive app is a hosted app that is also widely used on other
platforms
(https://chrome.google.com/webstore/detail/google-drive/apdfllckaahabafndbhiea...),
we need this bootstrapping  code. The "Tips & Tricks" app is a v2 app and can
use event pages and the chrome.runtime.onInstalled API to efficiently execute
only once on first run. However, we can't use event pages for hosted apps, and
adding a normal background page to the Drive app would be too costly as it will
always be executed on browser startup.

Additionally, my reasoning that this code shouldn't belong to
"chrome/browser/chromeos/drive" is that that although ostensibly related, it is
a completely different code path for the files app. I think "first_run" better
describes what this code does, and I think there is an opportunity to refactor
the first run code in login_display_host_impl.cc so we don't have duplicate code
for starting stuff for new users.

Powered by Google App Engine
This is Rietveld 408576698