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

Side by Side Diff: ppapi/cpp/directory_entry.cc

Issue 14419003: PPAPI: Move PPB_DirectoryReader_Dev to stable (won't commit) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 7 years, 8 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
« no previous file with comments | « ppapi/cpp/directory_entry.h ('k') | ppapi/cpp/directory_reader.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_entry_dev.h" 5 #include "ppapi/cpp/directory_entry.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "ppapi/cpp/module.h" 9 #include "ppapi/cpp/module.h"
10 10
11 namespace pp { 11 namespace pp {
12 12
13 DirectoryEntry_Dev::DirectoryEntry_Dev() { 13 DirectoryEntry::DirectoryEntry() {
14 memset(&data_, 0, sizeof(data_)); 14 memset(&data_, 0, sizeof(data_));
15 } 15 }
16 16
17 DirectoryEntry_Dev::DirectoryEntry_Dev( 17 DirectoryEntry::DirectoryEntry(PassRef, const PP_DirectoryEntry& data) {
18 PassRef, const PP_DirectoryEntry_Dev& data) {
19 data_.file_ref = data.file_ref; 18 data_.file_ref = data.file_ref;
20 data_.file_type = data.file_type; 19 data_.file_type = data.file_type;
21 } 20 }
22 21
23 DirectoryEntry_Dev::DirectoryEntry_Dev(const DirectoryEntry_Dev& other) { 22 DirectoryEntry::DirectoryEntry(const DirectoryEntry& other) {
24 data_.file_ref = other.data_.file_ref; 23 data_.file_ref = other.data_.file_ref;
25 data_.file_type = other.data_.file_type; 24 data_.file_type = other.data_.file_type;
26 if (data_.file_ref) 25 if (data_.file_ref)
27 Module::Get()->core()->AddRefResource(data_.file_ref); 26 Module::Get()->core()->AddRefResource(data_.file_ref);
28 } 27 }
29 28
30 DirectoryEntry_Dev::~DirectoryEntry_Dev() { 29 DirectoryEntry::~DirectoryEntry() {
31 if (data_.file_ref) 30 if (data_.file_ref)
32 Module::Get()->core()->ReleaseResource(data_.file_ref); 31 Module::Get()->core()->ReleaseResource(data_.file_ref);
33 } 32 }
34 33
35 DirectoryEntry_Dev& DirectoryEntry_Dev::operator=( 34 DirectoryEntry& DirectoryEntry::operator=(const DirectoryEntry& other) {
36 const DirectoryEntry_Dev& other) {
37 if (data_.file_ref) 35 if (data_.file_ref)
38 Module::Get()->core()->ReleaseResource(data_.file_ref); 36 Module::Get()->core()->ReleaseResource(data_.file_ref);
39 data_ = other.data_; 37 data_ = other.data_;
40 if (data_.file_ref) 38 if (data_.file_ref)
41 Module::Get()->core()->AddRefResource(data_.file_ref); 39 Module::Get()->core()->AddRefResource(data_.file_ref);
42 return *this; 40 return *this;
43 } 41 }
44 42
45 } // namespace pp 43 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/directory_entry.h ('k') | ppapi/cpp/directory_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698