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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/register_app_task.cc

Issue 610223002: [SyncFS] Use nullptr instead of NULL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/drive_backend/register_app_task.h" 5 #include "chrome/browser/sync_file_system/drive_backend/register_app_task.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "chrome/browser/drive/drive_api_util.h" 9 #include "chrome/browser/drive/drive_api_util.h"
10 #include "chrome/browser/drive/drive_service_interface.h" 10 #include "chrome/browser/drive/drive_service_interface.h"
(...skipping 26 matching lines...) Expand all
37 create_folder_retry_count_(0), 37 create_folder_retry_count_(0),
38 app_id_(app_id), 38 app_id_(app_id),
39 weak_ptr_factory_(this) { 39 weak_ptr_factory_(this) {
40 } 40 }
41 41
42 RegisterAppTask::~RegisterAppTask() { 42 RegisterAppTask::~RegisterAppTask() {
43 } 43 }
44 44
45 bool RegisterAppTask::CanFinishImmediately() { 45 bool RegisterAppTask::CanFinishImmediately() {
46 return metadata_database() && 46 return metadata_database() &&
47 metadata_database()->FindAppRootTracker(app_id_, NULL); 47 metadata_database()->FindAppRootTracker(app_id_, nullptr);
48 } 48 }
49 49
50 void RegisterAppTask::RunExclusive(const SyncStatusCallback& callback) { 50 void RegisterAppTask::RunExclusive(const SyncStatusCallback& callback) {
51 if (create_folder_retry_count_++ >= kMaxRetry) { 51 if (create_folder_retry_count_++ >= kMaxRetry) {
52 callback.Run(SYNC_STATUS_FAILED); 52 callback.Run(SYNC_STATUS_FAILED);
53 return; 53 return;
54 } 54 }
55 55
56 if (!metadata_database() || !drive_service()) { 56 if (!metadata_database() || !drive_service()) {
57 callback.Run(SYNC_STATUS_FAILED); 57 callback.Run(SYNC_STATUS_FAILED);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 MetadataDatabase* RegisterAppTask::metadata_database() { 176 MetadataDatabase* RegisterAppTask::metadata_database() {
177 return sync_context_->GetMetadataDatabase(); 177 return sync_context_->GetMetadataDatabase();
178 } 178 }
179 179
180 drive::DriveServiceInterface* RegisterAppTask::drive_service() { 180 drive::DriveServiceInterface* RegisterAppTask::drive_service() {
181 return sync_context_->GetDriveService(); 181 return sync_context_->GetDriveService();
182 } 182 }
183 183
184 } // namespace drive_backend 184 } // namespace drive_backend
185 } // namespace sync_file_system 185 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698