OLD | NEW |
---|---|
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 #include "chrome/browser/extensions/api/system_private/system_private_api.h" | 5 #include "chrome/browser/extensions/api/system_private/system_private_api.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/extensions/event_router_forwarder.h" | 10 #include "chrome/browser/extensions/event_router_forwarder.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 state = kUpdatingState; | 109 state = kUpdatingState; |
110 download_progress = 1; | 110 download_progress = 1; |
111 break; | 111 break; |
112 case chromeos::UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT: | 112 case chromeos::UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT: |
113 state = kNeedRestartState; | 113 state = kNeedRestartState; |
114 download_progress = 1; | 114 download_progress = 1; |
115 break; | 115 break; |
116 case chromeos::UpdateEngineClient::UPDATE_STATUS_REPORTING_ERROR_EVENT: | 116 case chromeos::UpdateEngineClient::UPDATE_STATUS_REPORTING_ERROR_EVENT: |
117 state = kNotAvailableState; | 117 state = kNotAvailableState; |
118 break; | 118 break; |
119 case chromeos::UpdateEngineClient::UPDATE_STATUS_ATTEMPTING_ROLLBACK: | |
Daniel Erat
2014/06/02 13:41:31
nit: just combine this with the previous case?
| |
120 state = kNotAvailableState; | |
121 break; | |
119 } | 122 } |
120 #else | 123 #else |
121 if (UpgradeDetector::GetInstance()->notify_upgrade()) { | 124 if (UpgradeDetector::GetInstance()->notify_upgrade()) { |
122 state = kNeedRestartState; | 125 state = kNeedRestartState; |
123 download_progress = 1; | 126 download_progress = 1; |
124 } else { | 127 } else { |
125 state = kNotAvailableState; | 128 state = kNotAvailableState; |
126 } | 129 } |
127 #endif | 130 #endif |
128 base::DictionaryValue* dict = new base::DictionaryValue(); | 131 base::DictionaryValue* dict = new base::DictionaryValue(); |
(...skipping 25 matching lines...) Expand all Loading... | |
154 | 157 |
155 void DispatchScreenUnlockedEvent() { | 158 void DispatchScreenUnlockedEvent() { |
156 DispatchEvent(system_private::OnScreenUnlocked::kEventName, NULL); | 159 DispatchEvent(system_private::OnScreenUnlocked::kEventName, NULL); |
157 } | 160 } |
158 | 161 |
159 void DispatchWokeUpEvent() { | 162 void DispatchWokeUpEvent() { |
160 DispatchEvent(system_private::OnWokeUp::kEventName, NULL); | 163 DispatchEvent(system_private::OnWokeUp::kEventName, NULL); |
161 } | 164 } |
162 | 165 |
163 } // namespace extensions | 166 } // namespace extensions |
OLD | NEW |