| 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 "chromeos/dbus/update_engine_client.h" | 5 #include "chromeos/dbus/update_engine_client.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 378 |
| 379 // Validate the value of status | 379 // Validate the value of status |
| 380 if (status > update_engine::EndOfLifeStatus::kEol || | 380 if (status > update_engine::EndOfLifeStatus::kEol || |
| 381 status < update_engine::EndOfLifeStatus::kSupported) { | 381 status < update_engine::EndOfLifeStatus::kSupported) { |
| 382 LOG(ERROR) << "Incorrect status value: " << status; | 382 LOG(ERROR) << "Incorrect status value: " << status; |
| 383 callback.Run(update_engine::EndOfLifeStatus::kSupported); | 383 callback.Run(update_engine::EndOfLifeStatus::kSupported); |
| 384 return; | 384 return; |
| 385 } | 385 } |
| 386 | 386 |
| 387 VLOG(1) << "Eol status received: " << status; | 387 VLOG(1) << "Eol status received: " << status; |
| 388 callback.Run(status); | 388 callback.Run(static_cast<update_engine::EndOfLifeStatus>(status)); |
| 389 } | 389 } |
| 390 | 390 |
| 391 // Called when a status update signal is received. | 391 // Called when a status update signal is received. |
| 392 void StatusUpdateReceived(dbus::Signal* signal) { | 392 void StatusUpdateReceived(dbus::Signal* signal) { |
| 393 VLOG(1) << "Status update signal received: " << signal->ToString(); | 393 VLOG(1) << "Status update signal received: " << signal->ToString(); |
| 394 dbus::MessageReader reader(signal); | 394 dbus::MessageReader reader(signal); |
| 395 int64_t last_checked_time = 0; | 395 int64_t last_checked_time = 0; |
| 396 double progress = 0.0; | 396 double progress = 0.0; |
| 397 std::string current_operation; | 397 std::string current_operation; |
| 398 std::string new_version; | 398 std::string new_version; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 auto cix = std::find(kReleaseChannelsList, | 610 auto cix = std::find(kReleaseChannelsList, |
| 611 kReleaseChannelsList + arraysize(kReleaseChannelsList), | 611 kReleaseChannelsList + arraysize(kReleaseChannelsList), |
| 612 current_channel); | 612 current_channel); |
| 613 auto tix = std::find(kReleaseChannelsList, | 613 auto tix = std::find(kReleaseChannelsList, |
| 614 kReleaseChannelsList + arraysize(kReleaseChannelsList), | 614 kReleaseChannelsList + arraysize(kReleaseChannelsList), |
| 615 target_channel); | 615 target_channel); |
| 616 return tix > cix; | 616 return tix > cix; |
| 617 } | 617 } |
| 618 | 618 |
| 619 } // namespace chromeos | 619 } // namespace chromeos |
| OLD | NEW |