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

Side by Side Diff: chrome/browser/sync_file_system/local/canned_syncable_file_system.cc

Issue 515093002: FileAPI/sync file system cleanups for scoped_refptr operator T* cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/local/canned_syncable_file_system.h" 5 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 runner->PostTaskAndReply( 202 runner->PostTaskAndReply(
203 FROM_HERE, base::Bind(&base::DoNothing), run_loop.QuitClosure()); 203 FROM_HERE, base::Bind(&base::DoNothing), run_loop.QuitClosure());
204 run_loop.Run(); 204 run_loop.Run();
205 } 205 }
206 206
207 } // namespace 207 } // namespace
208 208
209 CannedSyncableFileSystem::CannedSyncableFileSystem( 209 CannedSyncableFileSystem::CannedSyncableFileSystem(
210 const GURL& origin, 210 const GURL& origin,
211 leveldb::Env* env_override, 211 leveldb::Env* env_override,
212 base::SingleThreadTaskRunner* io_task_runner, 212 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
213 base::SingleThreadTaskRunner* file_task_runner) 213 const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner)
214 : origin_(origin), 214 : origin_(origin),
215 type_(storage::kFileSystemTypeSyncable), 215 type_(storage::kFileSystemTypeSyncable),
216 result_(base::File::FILE_OK), 216 result_(base::File::FILE_OK),
217 sync_status_(sync_file_system::SYNC_STATUS_OK), 217 sync_status_(sync_file_system::SYNC_STATUS_OK),
218 env_override_(env_override), 218 env_override_(env_override),
219 io_task_runner_(io_task_runner), 219 io_task_runner_(io_task_runner),
220 file_task_runner_(file_task_runner), 220 file_task_runner_(file_task_runner),
221 is_filesystem_set_up_(false), 221 is_filesystem_set_up_(false),
222 is_filesystem_opened_(false), 222 is_filesystem_opened_(false),
223 sync_status_observers_(new ObserverList) { 223 sync_status_observers_(new ObserverList) {
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 sync_status_ = status; 757 sync_status_ = status;
758 quit_closure.Run(); 758 quit_closure.Run();
759 } 759 }
760 760
761 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { 761 void CannedSyncableFileSystem::InitializeSyncStatusObserver() {
762 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); 762 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread());
763 backend()->sync_context()->sync_status()->AddObserver(this); 763 backend()->sync_context()->sync_status()->AddObserver(this);
764 } 764 }
765 765
766 } // namespace sync_file_system 766 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698