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

Unified Diff: ppapi/cpp/dev/directory_entry_dev.cc

Issue 14784002: Move DirectoryReader::ReadEntries to FileRef::ReadDirectoryEntries (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/cpp/dev/directory_entry_dev.h ('k') | ppapi/cpp/dev/directory_reader_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/directory_entry_dev.cc
diff --git a/ppapi/cpp/dev/directory_entry_dev.cc b/ppapi/cpp/dev/directory_entry_dev.cc
deleted file mode 100644
index 7d538903bde63dbbfea7b88e6917db80514c575e..0000000000000000000000000000000000000000
--- a/ppapi/cpp/dev/directory_entry_dev.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/cpp/dev/directory_entry_dev.h"
-
-#include <string.h>
-
-#include "ppapi/cpp/logging.h"
-#include "ppapi/cpp/module.h"
-
-namespace pp {
-
-DirectoryEntry_Dev::DirectoryEntry_Dev() {
- memset(&data_, 0, sizeof(data_));
-}
-
-DirectoryEntry_Dev::DirectoryEntry_Dev(
- PassRef, const PP_DirectoryEntry_Dev& data) {
- data_.file_ref = data.file_ref;
- data_.file_type = data.file_type;
-}
-
-DirectoryEntry_Dev::DirectoryEntry_Dev(const DirectoryEntry_Dev& other) {
- data_.file_ref = other.data_.file_ref;
- data_.file_type = other.data_.file_type;
- if (data_.file_ref)
- Module::Get()->core()->AddRefResource(data_.file_ref);
-}
-
-DirectoryEntry_Dev::~DirectoryEntry_Dev() {
- if (data_.file_ref)
- Module::Get()->core()->ReleaseResource(data_.file_ref);
-}
-
-DirectoryEntry_Dev& DirectoryEntry_Dev::operator=(
- const DirectoryEntry_Dev& other) {
- if (data_.file_ref)
- Module::Get()->core()->ReleaseResource(data_.file_ref);
- data_ = other.data_;
- if (data_.file_ref)
- Module::Get()->core()->AddRefResource(data_.file_ref);
- return *this;
-}
-
-namespace internal {
-
-DirectoryEntryArrayOutputAdapterWithStorage::
- DirectoryEntryArrayOutputAdapterWithStorage() {
- set_output(&temp_storage_);
-}
-
-DirectoryEntryArrayOutputAdapterWithStorage::
- ~DirectoryEntryArrayOutputAdapterWithStorage() {
- if (!temp_storage_.empty()) {
- // An easy way to release the resource references held by |temp_storage_|.
- // A destructor for PP_DirectoryEntry_Dev will release them.
- output();
- }
-}
-
-std::vector<DirectoryEntry_Dev>&
- DirectoryEntryArrayOutputAdapterWithStorage::output() {
- PP_DCHECK(output_storage_.empty());
- typedef std::vector<PP_DirectoryEntry_Dev> Entries;
- for (Entries::iterator it = temp_storage_.begin();
- it != temp_storage_.end();
- ++it) {
- output_storage_.push_back(DirectoryEntry_Dev(PASS_REF, *it));
- }
- temp_storage_.clear();
- return output_storage_;
-}
-
-} // namespace internal
-} // namespace pp
« no previous file with comments | « ppapi/cpp/dev/directory_entry_dev.h ('k') | ppapi/cpp/dev/directory_reader_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698