Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |