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

Side by Side Diff: update_attempter.cc

Issue 3404015: AU: move AU completed marker from /tmp to /var/run since /var/run is root-only. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Created 10 years, 3 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 | update_attempter_unittest.cc » ('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) 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
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
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
OLDNEW
« no previous file with comments | « no previous file | update_attempter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698