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

Side by Side Diff: chrome/browser/chromeos/first_run/drive_first_run_controller.h

Issue 55423004: Enable Google Drive offline mode automatically on first run. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed to DriveFirstRunController Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 #ifndef CHROME_BROWSER_CHROMEOS_FIRST_RUN_DRIVE_FIRST_RUN_CONTROLLER_H_
5 #define CHROME_BROWSER_CHROMEOS_FIRST_RUN_DRIVE_FIRST_RUN_CONTROLLER_H_
6
7 #include "base/basictypes.h"
8 #include "base/timer/timer.h"
9 #include "chrome/browser/profiles/profile.h"
10
11 namespace chromeos {
12
13 class DriveWebContentsManager;
14
15 // This class is responsible for kicking off the Google Drive offline
16 // initialization process. There is an initial delay to avoid contention when
17 // the session starts. DriveFirstRunController will manage its own lifetime and
18 // destroy itself when the initialization succeeds or fails.
19 class DriveFirstRunController {
20 public:
21 DriveFirstRunController();
22 ~DriveFirstRunController();
23
24 void EnableOfflineMode();
achuithb 2013/11/04 20:33:24 Please add a short comment for each function in th
Tim Song 2013/11/05 01:18:06 Done.
25
26 private:
27 void OnOptInDone(bool success);
28 void OnWebContentsTimedOut();
29 void CleanUp();
30
31 Profile* profile_;
32 scoped_ptr<DriveWebContentsManager> web_contents_manager_;
33 base::OneShotTimer<DriveFirstRunController> web_contents_timer_;
34 base::OneShotTimer<DriveFirstRunController> initial_delay_timer_;
35 bool started_;
36
37 DISALLOW_COPY_AND_ASSIGN(DriveFirstRunController);
38 };
39
40 } // namespace chromeos
41
42 #endif // CHROME_BROWSER_CHROMEOS_FIRST_RUN_DRIVE_FIRST_RUN_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698