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

Side by Side Diff: chrome/browser/chromeos/drive/file_cache_metadata.cc

Issue 16998003: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/drive/file_cache_metadata.h" 5 #include "chrome/browser/chromeos/drive/file_cache_metadata.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_enumerator.h" 9 #include "base/files/file_enumerator.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 182
183 scoped_ptr<FileCacheMetadata::Iterator> FileCacheMetadata::GetIterator() { 183 scoped_ptr<FileCacheMetadata::Iterator> FileCacheMetadata::GetIterator() {
184 AssertOnSequencedWorkerPool(); 184 AssertOnSequencedWorkerPool();
185 185
186 scoped_ptr<leveldb::Iterator> iter(level_db_->NewIterator( 186 scoped_ptr<leveldb::Iterator> iter(level_db_->NewIterator(
187 leveldb::ReadOptions())); 187 leveldb::ReadOptions()));
188 return make_scoped_ptr(new Iterator(iter.Pass())); 188 return make_scoped_ptr(new Iterator(iter.Pass()));
189 } 189 }
190 190
191 void FileCacheMetadata::AssertOnSequencedWorkerPool() { 191 void FileCacheMetadata::AssertOnSequencedWorkerPool() {
192 DCHECK(!blocking_task_runner_ || 192 DCHECK(!blocking_task_runner_.get() ||
193 blocking_task_runner_->RunsTasksOnCurrentThread()); 193 blocking_task_runner_->RunsTasksOnCurrentThread());
194 } 194 }
195 195
196 } // namespace internal 196 } // namespace internal
197 } // namespace drive 197 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_cache.cc ('k') | chrome/browser/chromeos/drive/file_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698