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

Unified Diff: net/disk_cache/simple/simple_index_file_posix.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « net/disk_cache/simple/simple_index_file.cc ('k') | net/disk_cache/simple/simple_index_file_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_index_file_posix.cc
diff --git a/net/disk_cache/simple/simple_index_file_posix.cc b/net/disk_cache/simple/simple_index_file_posix.cc
deleted file mode 100644
index 586699d2a8ebb8935a031f87d156fabdbf1d7f9d..0000000000000000000000000000000000000000
--- a/net/disk_cache/simple/simple_index_file_posix.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2013 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 "net/disk_cache/simple/simple_index_file.h"
-
-#include <dirent.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <string>
-
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace disk_cache {
-namespace {
-
-struct DirCloser {
- void operator()(DIR* dir) { closedir(dir); }
-};
-
-typedef scoped_ptr<DIR, DirCloser> ScopedDir;
-
-} // namespace
-
-// static
-bool SimpleIndexFile::TraverseCacheDirectory(
- const base::FilePath& cache_path,
- const EntryFileCallback& entry_file_callback) {
- const ScopedDir dir(opendir(cache_path.value().c_str()));
- if (!dir) {
- PLOG(ERROR) << "opendir " << cache_path.value();
- return false;
- }
- dirent entry, *result;
- while (readdir_r(dir.get(), &entry, &result) == 0) {
- if (!result)
- return true; // The traversal completed successfully.
- const std::string file_name(result->d_name);
- if (file_name == "." || file_name == "..")
- continue;
- const base::FilePath file_path = cache_path.Append(
- base::FilePath(file_name));
- entry_file_callback.Run(file_path);
- }
- PLOG(ERROR) << "readdir_r " << cache_path.value();
- return false;
-}
-
-} // namespace disk_cache
« no previous file with comments | « net/disk_cache/simple/simple_index_file.cc ('k') | net/disk_cache/simple/simple_index_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698