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

Side by Side Diff: ppapi/cpp/dev/directory_reader_dev.cc

Issue 5539001: Remove all the swap() stuff in the PPAPI C++ wrappers.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years 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
« no previous file with comments | « ppapi/cpp/dev/directory_reader_dev.h ('k') | ppapi/cpp/dev/file_chooser_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "ppapi/cpp/dev/directory_reader_dev.h" 5 #include "ppapi/cpp/dev/directory_reader_dev.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/cpp/completion_callback.h" 8 #include "ppapi/cpp/completion_callback.h"
9 #include "ppapi/cpp/dev/directory_entry_dev.h" 9 #include "ppapi/cpp/dev/directory_entry_dev.h"
10 #include "ppapi/cpp/dev/file_ref_dev.h" 10 #include "ppapi/cpp/dev/file_ref_dev.h"
(...skipping 15 matching lines...) Expand all
26 PassRefFromConstructor( 26 PassRefFromConstructor(
27 directory_reader_f->Create(directory_ref.pp_resource())); 27 directory_reader_f->Create(directory_ref.pp_resource()));
28 } 28 }
29 29
30 DirectoryReader_Dev::DirectoryReader_Dev(const DirectoryReader_Dev& other) 30 DirectoryReader_Dev::DirectoryReader_Dev(const DirectoryReader_Dev& other)
31 : Resource(other) { 31 : Resource(other) {
32 } 32 }
33 33
34 DirectoryReader_Dev& DirectoryReader_Dev::operator=( 34 DirectoryReader_Dev& DirectoryReader_Dev::operator=(
35 const DirectoryReader_Dev& other) { 35 const DirectoryReader_Dev& other) {
36 DirectoryReader_Dev copy(other); 36 Resource::operator=(other);
37 swap(copy);
38 return *this; 37 return *this;
39 } 38 }
40 39
41 void DirectoryReader_Dev::swap(DirectoryReader_Dev& other) {
42 Resource::swap(other);
43 }
44
45 int32_t DirectoryReader_Dev::GetNextEntry(DirectoryEntry_Dev* entry, 40 int32_t DirectoryReader_Dev::GetNextEntry(DirectoryEntry_Dev* entry,
46 const CompletionCallback& cc) { 41 const CompletionCallback& cc) {
47 if (!directory_reader_f) 42 if (!directory_reader_f)
48 return PP_ERROR_NOINTERFACE; 43 return PP_ERROR_NOINTERFACE;
49 return directory_reader_f->GetNextEntry(pp_resource(), &entry->data_, 44 return directory_reader_f->GetNextEntry(pp_resource(), &entry->data_,
50 cc.pp_completion_callback()); 45 cc.pp_completion_callback());
51 } 46 }
52 47
53 } // namespace pp 48 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/directory_reader_dev.h ('k') | ppapi/cpp/dev/file_chooser_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698