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

Side by Side Diff: components/update_client/action_update.cc

Issue 2521063004: Replace ptr.reset with std::move in src/components (Closed)
Patch Set: Created 4 years, 1 month 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 | « components/update_client/action.cc ('k') | components/update_client/update_engine.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/update_client/action_update.h" 5 #include "components/update_client/action_update.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 242
243 void ActionUpdateDiff::TryUpdateFull() { 243 void ActionUpdateDiff::TryUpdateFull() {
244 DCHECK(thread_checker_.CalledOnValidThread()); 244 DCHECK(thread_checker_.CalledOnValidThread());
245 std::unique_ptr<Action> update_action(ActionUpdateFull::Create()); 245 std::unique_ptr<Action> update_action(ActionUpdateFull::Create());
246 246
247 base::ThreadTaskRunnerHandle::Get()->PostTask( 247 base::ThreadTaskRunnerHandle::Get()->PostTask(
248 FROM_HERE, base::Bind(&Action::Run, base::Unretained(update_action.get()), 248 FROM_HERE, base::Bind(&Action::Run, base::Unretained(update_action.get()),
249 update_context_, callback_)); 249 update_context_, callback_));
250 250
251 update_context_->current_action.reset(update_action.release()); 251 update_context_->current_action = std::move(update_action);
252 } 252 }
253 253
254 bool ActionUpdateDiff::IsBackgroundDownload(const CrxUpdateItem* item) { 254 bool ActionUpdateDiff::IsBackgroundDownload(const CrxUpdateItem* item) {
255 DCHECK(thread_checker_.CalledOnValidThread()); 255 DCHECK(thread_checker_.CalledOnValidThread());
256 return false; 256 return false;
257 } 257 }
258 258
259 std::vector<GURL> ActionUpdateDiff::GetUrls(const CrxUpdateItem* item) { 259 std::vector<GURL> ActionUpdateDiff::GetUrls(const CrxUpdateItem* item) {
260 DCHECK(thread_checker_.CalledOnValidThread()); 260 DCHECK(thread_checker_.CalledOnValidThread());
261 return item->crx_diffurls; 261 return item->crx_diffurls;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 item->error_category = static_cast<int>(error_category); 417 item->error_category = static_cast<int>(error_category);
418 item->error_code = error; 418 item->error_code = error;
419 item->extra_code1 = extended_error; 419 item->extra_code1 = extended_error;
420 ChangeItemState(item, CrxUpdateItem::State::kNoUpdate); 420 ChangeItemState(item, CrxUpdateItem::State::kNoUpdate);
421 421
422 UpdateCrxComplete(item); 422 UpdateCrxComplete(item);
423 } 423 }
424 424
425 } // namespace update_client 425 } // namespace update_client
OLDNEW
« no previous file with comments | « components/update_client/action.cc ('k') | components/update_client/update_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698