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

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

Issue 608133002: [SyncFS] Use nullptr for scoped_ptr initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nullptr
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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/fake_sync_worker.h" 5 #include "chrome/browser/sync_file_system/drive_backend/fake_sync_worker.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants. h" 8 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants. h"
9 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_context.h" 9 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_context.h"
10 #include "chrome/browser/sync_file_system/sync_status_code.h" 10 #include "chrome/browser/sync_file_system/sync_status_code.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 default: 103 default:
104 (*status_map)[itr->first] = "Unknown"; 104 (*status_map)[itr->first] = "Unknown";
105 break; 105 break;
106 } 106 }
107 } 107 }
108 callback.Run(status_map.Pass()); 108 callback.Run(status_map.Pass());
109 } 109 }
110 110
111 scoped_ptr<base::ListValue> FakeSyncWorker::DumpFiles(const GURL& origin) { 111 scoped_ptr<base::ListValue> FakeSyncWorker::DumpFiles(const GURL& origin) {
112 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 112 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
113 return scoped_ptr<base::ListValue>(); 113 return nullptr;
114 } 114 }
115 115
116 scoped_ptr<base::ListValue> FakeSyncWorker::DumpDatabase() { 116 scoped_ptr<base::ListValue> FakeSyncWorker::DumpDatabase() {
117 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 117 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
118 return scoped_ptr<base::ListValue>(); 118 return nullptr;
119 } 119 }
120 120
121 void FakeSyncWorker::SetSyncEnabled(bool enabled) { 121 void FakeSyncWorker::SetSyncEnabled(bool enabled) {
122 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 122 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
123 sync_enabled_ = enabled; 123 sync_enabled_ = enabled;
124 124
125 if (enabled) 125 if (enabled)
126 UpdateServiceState(REMOTE_SERVICE_OK, "Set FakeSyncWorker enabled."); 126 UpdateServiceState(REMOTE_SERVICE_OK, "Set FakeSyncWorker enabled.");
127 else 127 else
128 UpdateServiceState(REMOTE_SERVICE_DISABLED, "Disabled FakeSyncWorker."); 128 UpdateServiceState(REMOTE_SERVICE_DISABLED, "Disabled FakeSyncWorker.");
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 const std::string& description) { 170 const std::string& description) {
171 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 171 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
172 172
173 FOR_EACH_OBSERVER( 173 FOR_EACH_OBSERVER(
174 Observer, observers_, 174 Observer, observers_,
175 UpdateServiceState(state, description)); 175 UpdateServiceState(state, description));
176 } 176 }
177 177
178 } // namespace drive_backend 178 } // namespace drive_backend
179 } // namespace sync_file_system 179 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698