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

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

Issue 319923003: Logging for UpdateEngineClient added temporarily. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 20 matching lines...) Expand all
31 // during fake AU. 31 // during fake AU.
32 const int kStateTransitionDownloadingDelayMs = 250; 32 const int kStateTransitionDownloadingDelayMs = 250;
33 33
34 // Size of parts of a "new" image which are downloaded each 34 // Size of parts of a "new" image which are downloaded each
35 // |kStateTransitionDownloadingDelayMs| during fake AU. 35 // |kStateTransitionDownloadingDelayMs| during fake AU.
36 const int64_t kDownloadSizeDelta = 1 << 19; 36 const int64_t kDownloadSizeDelta = 1 << 19;
37 37
38 // Returns UPDATE_STATUS_ERROR on error. 38 // Returns UPDATE_STATUS_ERROR on error.
39 UpdateEngineClient::UpdateStatusOperation UpdateStatusFromString( 39 UpdateEngineClient::UpdateStatusOperation UpdateStatusFromString(
40 const std::string& str) { 40 const std::string& str) {
41 VLOG(1) << "UpdateStatusFromString got " << str << " as input.";
41 if (str == update_engine::kUpdateStatusIdle) 42 if (str == update_engine::kUpdateStatusIdle)
42 return UpdateEngineClient::UPDATE_STATUS_IDLE; 43 return UpdateEngineClient::UPDATE_STATUS_IDLE;
43 if (str == update_engine::kUpdateStatusCheckingForUpdate) 44 if (str == update_engine::kUpdateStatusCheckingForUpdate)
44 return UpdateEngineClient::UPDATE_STATUS_CHECKING_FOR_UPDATE; 45 return UpdateEngineClient::UPDATE_STATUS_CHECKING_FOR_UPDATE;
45 if (str == update_engine::kUpdateStatusUpdateAvailable) 46 if (str == update_engine::kUpdateStatusUpdateAvailable)
46 return UpdateEngineClient::UPDATE_STATUS_UPDATE_AVAILABLE; 47 return UpdateEngineClient::UPDATE_STATUS_UPDATE_AVAILABLE;
47 if (str == update_engine::kUpdateStatusDownloading) 48 if (str == update_engine::kUpdateStatusDownloading)
48 return UpdateEngineClient::UPDATE_STATUS_DOWNLOADING; 49 return UpdateEngineClient::UPDATE_STATUS_DOWNLOADING;
49 if (str == update_engine::kUpdateStatusVerifying) 50 if (str == update_engine::kUpdateStatusVerifying)
50 return UpdateEngineClient::UPDATE_STATUS_VERIFYING; 51 return UpdateEngineClient::UPDATE_STATUS_VERIFYING;
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 543 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
543 return new UpdateEngineClientImpl(); 544 return new UpdateEngineClientImpl();
544 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); 545 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
545 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestAutoUpdateUI)) 546 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestAutoUpdateUI))
546 return new UpdateEngineClientFakeImpl(); 547 return new UpdateEngineClientFakeImpl();
547 else 548 else
548 return new UpdateEngineClientStubImpl(); 549 return new UpdateEngineClientStubImpl();
549 } 550 }
550 551
551 } // namespace chromeos 552 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698