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

Side by Side Diff: chrome/browser/media_galleries/win/mtp_device_object_enumerator.cc

Issue 23727009: Cleanup: Remove chrome namespace for storage monitor and media galleries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nit Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // MTPDeviceObjectEnumerator implementation. 5 // MTPDeviceObjectEnumerator implementation.
6 6
7 #include "chrome/browser/media_galleries/win/mtp_device_object_enumerator.h" 7 #include "chrome/browser/media_galleries/win/mtp_device_object_enumerator.h"
8 8
9 #include "base/threading/thread_restrictions.h" 9 #include "base/threading/thread_restrictions.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 11
12 namespace chrome {
13
14 MTPDeviceObjectEnumerator::MTPDeviceObjectEnumerator( 12 MTPDeviceObjectEnumerator::MTPDeviceObjectEnumerator(
15 const MTPDeviceObjectEntries& entries) 13 const MTPDeviceObjectEntries& entries)
16 : object_entries_(entries), 14 : object_entries_(entries),
17 index_(0U), 15 index_(0U),
18 is_index_ready_(false) { 16 is_index_ready_(false) {
19 base::ThreadRestrictions::AssertIOAllowed(); 17 base::ThreadRestrictions::AssertIOAllowed();
20 } 18 }
21 19
22 MTPDeviceObjectEnumerator::~MTPDeviceObjectEnumerator() { 20 MTPDeviceObjectEnumerator::~MTPDeviceObjectEnumerator() {
23 DCHECK(thread_checker_.CalledOnValidThread()); 21 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return object_entries_[index_].object_id; 61 return object_entries_[index_].object_id;
64 } 62 }
65 63
66 bool MTPDeviceObjectEnumerator::HasMoreEntries() const { 64 bool MTPDeviceObjectEnumerator::HasMoreEntries() const {
67 return index_ < object_entries_.size(); 65 return index_ < object_entries_.size();
68 } 66 }
69 67
70 bool MTPDeviceObjectEnumerator::IsIndexReadyAndInRange() const { 68 bool MTPDeviceObjectEnumerator::IsIndexReadyAndInRange() const {
71 return is_index_ready_ && HasMoreEntries(); 69 return is_index_ready_ && HasMoreEntries();
72 } 70 }
73
74 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698