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

Side by Side Diff: chromeos/dbus/update_engine_client.cc

Issue 2081873002: Incorporate comments in Dbus code and add Eol icon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporate comments from isherman@ Created 4 years, 5 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
« no previous file with comments | « chromeos/dbus/update_engine_client.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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
OLDNEW
« no previous file with comments | « chromeos/dbus/update_engine_client.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698