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

Side by Side Diff: chrome/browser/sync_file_system/sync_process_runner.cc

Issue 1873683002: Convert //chrome/browser/sync_file_system from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/sync_file_system/sync_process_runner.h" 5 #include "chrome/browser/sync_file_system/sync_process_runner.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 status == SYNC_STATUS_NO_CONFLICT || 53 status == SYNC_STATUS_NO_CONFLICT ||
54 status == SYNC_STATUS_NO_CHANGE_TO_SYNC || 54 status == SYNC_STATUS_NO_CHANGE_TO_SYNC ||
55 status == SYNC_STATUS_UNKNOWN_ORIGIN || 55 status == SYNC_STATUS_UNKNOWN_ORIGIN ||
56 status == SYNC_STATUS_RETRY; 56 status == SYNC_STATUS_RETRY;
57 } 57 }
58 58
59 } // namespace 59 } // namespace
60 60
61 SyncProcessRunner::SyncProcessRunner(const std::string& name, 61 SyncProcessRunner::SyncProcessRunner(const std::string& name,
62 Client* client, 62 Client* client,
63 scoped_ptr<TimerHelper> timer_helper, 63 std::unique_ptr<TimerHelper> timer_helper,
64 size_t max_parallel_task) 64 size_t max_parallel_task)
65 : name_(name), 65 : name_(name),
66 client_(client), 66 client_(client),
67 max_parallel_task_(max_parallel_task), 67 max_parallel_task_(max_parallel_task),
68 running_tasks_(0), 68 running_tasks_(0),
69 timer_helper_(std::move(timer_helper)), 69 timer_helper_(std::move(timer_helper)),
70 service_state_(SYNC_SERVICE_RUNNING), 70 service_state_(SYNC_SERVICE_RUNNING),
71 pending_changes_(0), 71 pending_changes_(0),
72 factory_(this) { 72 factory_(this) {
73 DCHECK_LE(1u, max_parallel_task_); 73 DCHECK_LE(1u, max_parallel_task_);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 FROM_HERE, next_scheduled - now, 234 FROM_HERE, next_scheduled - now,
235 base::Bind(&SyncProcessRunner::Run, base::Unretained(this))); 235 base::Bind(&SyncProcessRunner::Run, base::Unretained(this)));
236 } 236 }
237 237
238 void SyncProcessRunner::CheckIfIdle() { 238 void SyncProcessRunner::CheckIfIdle() {
239 if (pending_changes_ == 0 && running_tasks_ == 0) 239 if (pending_changes_ == 0 && running_tasks_ == 0)
240 client_->OnSyncIdle(); 240 client_->OnSyncIdle();
241 } 241 }
242 242
243 } // namespace sync_file_system 243 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/sync_process_runner.h ('k') | chrome/browser/sync_file_system/sync_process_runner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698