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> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
8 | 10 |
9 #include "base/bind.h" | 11 #include "base/bind.h" |
10 #include "base/command_line.h" | 12 #include "base/command_line.h" |
11 #include "base/location.h" | 13 #include "base/location.h" |
12 #include "base/macros.h" | 14 #include "base/macros.h" |
13 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
14 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
15 #include "base/thread_task_runner_handle.h" | 17 #include "base/thread_task_runner_handle.h" |
16 #include "chromeos/chromeos_switches.h" | 18 #include "chromeos/chromeos_switches.h" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 return; | 346 return; |
345 } | 347 } |
346 VLOG(1) << "The channel received: " << channel; | 348 VLOG(1) << "The channel received: " << channel; |
347 callback.Run(channel); | 349 callback.Run(channel); |
348 } | 350 } |
349 | 351 |
350 // Called when a status update signal is received. | 352 // Called when a status update signal is received. |
351 void StatusUpdateReceived(dbus::Signal* signal) { | 353 void StatusUpdateReceived(dbus::Signal* signal) { |
352 VLOG(1) << "Status update signal received: " << signal->ToString(); | 354 VLOG(1) << "Status update signal received: " << signal->ToString(); |
353 dbus::MessageReader reader(signal); | 355 dbus::MessageReader reader(signal); |
354 int64 last_checked_time = 0; | 356 int64_t last_checked_time = 0; |
355 double progress = 0.0; | 357 double progress = 0.0; |
356 std::string current_operation; | 358 std::string current_operation; |
357 std::string new_version; | 359 std::string new_version; |
358 int64_t new_size = 0; | 360 int64_t new_size = 0; |
359 if (!(reader.PopInt64(&last_checked_time) && | 361 if (!(reader.PopInt64(&last_checked_time) && |
360 reader.PopDouble(&progress) && | 362 reader.PopDouble(&progress) && |
361 reader.PopString(¤t_operation) && | 363 reader.PopString(¤t_operation) && |
362 reader.PopString(&new_version) && | 364 reader.PopString(&new_version) && |
363 reader.PopInt64(&new_size))) { | 365 reader.PopInt64(&new_size))) { |
364 LOG(ERROR) << "Status changed signal had incorrect parameters: " | 366 LOG(ERROR) << "Status changed signal had incorrect parameters: " |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 auto cix = std::find(kReleaseChannelsList, | 567 auto cix = std::find(kReleaseChannelsList, |
566 kReleaseChannelsList + arraysize(kReleaseChannelsList), | 568 kReleaseChannelsList + arraysize(kReleaseChannelsList), |
567 current_channel); | 569 current_channel); |
568 auto tix = std::find(kReleaseChannelsList, | 570 auto tix = std::find(kReleaseChannelsList, |
569 kReleaseChannelsList + arraysize(kReleaseChannelsList), | 571 kReleaseChannelsList + arraysize(kReleaseChannelsList), |
570 target_channel); | 572 target_channel); |
571 return tix > cix; | 573 return tix > cix; |
572 } | 574 } |
573 | 575 |
574 } // namespace chromeos | 576 } // namespace chromeos |
OLD | NEW |