| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS 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 "update_engine/update_attempter.h" | 5 #include "update_engine/update_attempter.h" |
| 6 | 6 |
| 7 // From 'man clock_gettime': feature test macro: _POSIX_C_SOURCE >= 199309L | 7 // From 'man clock_gettime': feature test macro: _POSIX_C_SOURCE >= 199309L |
| 8 #ifndef _POSIX_C_SOURCE | 8 #ifndef _POSIX_C_SOURCE |
| 9 #define _POSIX_C_SOURCE 199309L | 9 #define _POSIX_C_SOURCE 199309L |
| 10 #endif // _POSIX_C_SOURCE | 10 #endif // _POSIX_C_SOURCE |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "update_engine/update_check_scheduler.h" | 29 #include "update_engine/update_check_scheduler.h" |
| 30 | 30 |
| 31 using base::TimeDelta; | 31 using base::TimeDelta; |
| 32 using base::TimeTicks; | 32 using base::TimeTicks; |
| 33 using std::tr1::shared_ptr; | 33 using std::tr1::shared_ptr; |
| 34 using std::string; | 34 using std::string; |
| 35 using std::vector; | 35 using std::vector; |
| 36 | 36 |
| 37 namespace chromeos_update_engine { | 37 namespace chromeos_update_engine { |
| 38 | 38 |
| 39 const char* kUpdateCompletedMarker = "/tmp/update_engine_autoupdate_completed"; | 39 const char* kUpdateCompletedMarker = |
| 40 "/var/run/update_engine_autoupdate_completed"; |
| 40 | 41 |
| 41 const char* UpdateStatusToString(UpdateStatus status) { | 42 const char* UpdateStatusToString(UpdateStatus status) { |
| 42 switch (status) { | 43 switch (status) { |
| 43 case UPDATE_STATUS_IDLE: | 44 case UPDATE_STATUS_IDLE: |
| 44 return "UPDATE_STATUS_IDLE"; | 45 return "UPDATE_STATUS_IDLE"; |
| 45 case UPDATE_STATUS_CHECKING_FOR_UPDATE: | 46 case UPDATE_STATUS_CHECKING_FOR_UPDATE: |
| 46 return "UPDATE_STATUS_CHECKING_FOR_UPDATE"; | 47 return "UPDATE_STATUS_CHECKING_FOR_UPDATE"; |
| 47 case UPDATE_STATUS_UPDATE_AVAILABLE: | 48 case UPDATE_STATUS_UPDATE_AVAILABLE: |
| 48 return "UPDATE_STATUS_UPDATE_AVAILABLE"; | 49 return "UPDATE_STATUS_UPDATE_AVAILABLE"; |
| 49 case UPDATE_STATUS_DOWNLOADING: | 50 case UPDATE_STATUS_DOWNLOADING: |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 SetPriority(utils::kProcessPriorityNormal); | 484 SetPriority(utils::kProcessPriorityNormal); |
| 484 return true; | 485 return true; |
| 485 } | 486 } |
| 486 // Set the priority to high and let GLib destroy the timeout source. | 487 // Set the priority to high and let GLib destroy the timeout source. |
| 487 SetPriority(utils::kProcessPriorityHigh); | 488 SetPriority(utils::kProcessPriorityHigh); |
| 488 manage_priority_source_ = NULL; | 489 manage_priority_source_ = NULL; |
| 489 return false; | 490 return false; |
| 490 } | 491 } |
| 491 | 492 |
| 492 } // namespace chromeos_update_engine | 493 } // namespace chromeos_update_engine |
| OLD | NEW |