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

Side by Side Diff: update_attempter.cc

Issue 6594025: AU: Full proxy support (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: fixes for review Created 9 years, 9 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 | « update_attempter.h ('k') | update_attempter_mock.h » ('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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 status_ = UPDATE_STATUS_UPDATED_NEED_REBOOT; 118 status_ = UPDATE_STATUS_UPDATED_NEED_REBOOT;
119 } 119 }
120 120
121 UpdateAttempter::~UpdateAttempter() { 121 UpdateAttempter::~UpdateAttempter() {
122 CleanupPriorityManagement(); 122 CleanupPriorityManagement();
123 } 123 }
124 124
125 void UpdateAttempter::Update(const std::string& app_version, 125 void UpdateAttempter::Update(const std::string& app_version,
126 const std::string& omaha_url, 126 const std::string& omaha_url,
127 bool obey_proxies) { 127 bool obey_proxies) {
128 chrome_proxy_resolver_.Init();
128 if (status_ == UPDATE_STATUS_UPDATED_NEED_REBOOT) { 129 if (status_ == UPDATE_STATUS_UPDATED_NEED_REBOOT) {
129 LOG(INFO) << "Not updating b/c we already updated and we're waiting for " 130 LOG(INFO) << "Not updating b/c we already updated and we're waiting for "
130 << "reboot"; 131 << "reboot";
131 return; 132 return;
132 } 133 }
133 if (status_ != UPDATE_STATUS_IDLE) { 134 if (status_ != UPDATE_STATUS_IDLE) {
134 // Update in progress. Do nothing 135 // Update in progress. Do nothing
135 return; 136 return;
136 } 137 }
137 http_response_code_ = 0; 138 http_response_code_ = 0;
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 uint64_t resume_offset = manifest_metadata_size + next_data_offset; 572 uint64_t resume_offset = manifest_metadata_size + next_data_offset;
572 if (resume_offset < response_handler_action_->install_plan().size) { 573 if (resume_offset < response_handler_action_->install_plan().size) {
573 fetcher->AddRange(resume_offset, -1); 574 fetcher->AddRange(resume_offset, -1);
574 } 575 }
575 } else { 576 } else {
576 fetcher->AddRange(0, -1); 577 fetcher->AddRange(0, -1);
577 } 578 }
578 } 579 }
579 580
580 } // namespace chromeos_update_engine 581 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « update_attempter.h ('k') | update_attempter_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698