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

Side by Side Diff: chrome/browser/chromeos/login/update_screen.h

Issue 10389064: Added estimated time remaining on AU. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Issues are fixed, sync. Created 8 years, 7 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time.h"
14 #include "base/timer.h" 15 #include "base/timer.h"
15 #include "chrome/browser/chromeos/login/update_screen_actor.h" 16 #include "chrome/browser/chromeos/login/update_screen_actor.h"
16 #include "chrome/browser/chromeos/login/wizard_screen.h" 17 #include "chrome/browser/chromeos/login/wizard_screen.h"
17 #include "chromeos/dbus/update_engine_client.h" 18 #include "chromeos/dbus/update_engine_client.h"
18 19
19 namespace chromeos { 20 namespace chromeos {
20 21
21 class ScreenObserver; 22 class ScreenObserver;
22 23
23 // Controller for the update screen. It does not depend on the specific 24 // Controller for the update screen. It does not depend on the specific
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 virtual void ExitUpdate(ExitReason reason); 63 virtual void ExitUpdate(ExitReason reason);
63 64
64 // UpdateEngineClient::Observer implementation: 65 // UpdateEngineClient::Observer implementation:
65 virtual void UpdateStatusChanged( 66 virtual void UpdateStatusChanged(
66 const UpdateEngineClient::Status& status) OVERRIDE; 67 const UpdateEngineClient::Status& status) OVERRIDE;
67 68
68 private: 69 private:
69 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestBasic); 70 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestBasic);
70 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestUpdateAvailable); 71 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestUpdateAvailable);
71 72
73 // Updates downloading stats (remaining time and downloading
74 // progress) on the AU screen.
75 void UpdateDownloadingStats(const UpdateEngineClient::Status& status);
76
72 // Returns true if there is critical system update that requires installation 77 // Returns true if there is critical system update that requires installation
73 // and immediate reboot. 78 // and immediate reboot.
74 bool HasCriticalUpdate(); 79 bool HasCriticalUpdate();
75 80
76 // Timer notification handlers. 81 // Timer notification handlers.
77 void OnWaitForRebootTimeElapsed(); 82 void OnWaitForRebootTimeElapsed();
78 83
79 // Checks that screen is shown, shows if not. 84 // Checks that screen is shown, shows if not.
80 void MakeSureScreenIsShown(); 85 void MakeSureScreenIsShown();
81 86
(...skipping 18 matching lines...) Expand all
100 // Note, this is false by default. 105 // Note, this is false by default.
101 bool is_ignore_update_deadlines_; 106 bool is_ignore_update_deadlines_;
102 // Whether the update screen is shown. 107 // Whether the update screen is shown.
103 bool is_shown_; 108 bool is_shown_;
104 // Ignore fist IDLE status that is sent before update screen initiated check. 109 // Ignore fist IDLE status that is sent before update screen initiated check.
105 bool ignore_idle_status_; 110 bool ignore_idle_status_;
106 111
107 // Keeps actor which is delegated with all showing operations. 112 // Keeps actor which is delegated with all showing operations.
108 UpdateScreenActor* actor_; 113 UpdateScreenActor* actor_;
109 114
115 // Time of the first notification from the downloading stage.
116 base::Time download_start_time_;
117 double download_start_progress_;
118
119 // Time of the last notification from the downloading stage.
120 base::Time download_last_time_;
121 double download_last_progress_;
122
123 bool is_download_average_speed_computed_;
124 double download_average_speed_;
125
110 DISALLOW_COPY_AND_ASSIGN(UpdateScreen); 126 DISALLOW_COPY_AND_ASSIGN(UpdateScreen);
111 }; 127 };
112 128
113 } // namespace chromeos 129 } // namespace chromeos
114 130
115 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_ 131 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UPDATE_SCREEN_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/mock_update_screen.h ('k') | chrome/browser/chromeos/login/update_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698