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

Unified Diff: extensions/browser/api/file_handlers/directory_util.h

Issue 2685883008: Revert of Move file_handlers API from //chrome to //extensions (Closed)
Patch Set: Created 3 years, 10 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
Index: extensions/browser/api/file_handlers/directory_util.h
diff --git a/extensions/browser/api/file_handlers/directory_util.h b/extensions/browser/api/file_handlers/directory_util.h
deleted file mode 100644
index 7e76de5dcbcf2be424eaaa870bea42042b48e4c0..0000000000000000000000000000000000000000
--- a/extensions/browser/api/file_handlers/directory_util.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2016 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.
-
-#ifndef EXTENSIONS_BROWSER_API_FILE_HANDLERS_DIRECTORY_UTIL_H_
-#define EXTENSIONS_BROWSER_API_FILE_HANDLERS_DIRECTORY_UTIL_H_
-
-#include <memory>
-#include <set>
-#include <string>
-#include <vector>
-
-#include "base/callback.h"
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-
-namespace content {
-class BrowserContext;
-}
-
-namespace base {
-class FilePath;
-} // namespace base
-
-namespace extensions {
-namespace app_file_handler_util {
-
-class IsDirectoryCollector {
- public:
- typedef base::Callback<void(std::unique_ptr<std::set<base::FilePath>>)>
- CompletionCallback;
-
- explicit IsDirectoryCollector(content::BrowserContext* context);
- virtual ~IsDirectoryCollector();
-
- // For the given paths obtains a set with which of them are directories.
- // The collector does not support virtual files if OS != CHROMEOS.
- void CollectForEntriesPaths(const std::vector<base::FilePath>& paths,
- const CompletionCallback& callback);
-
- private:
- void OnIsDirectoryCollected(size_t index, bool directory);
-
- content::BrowserContext* context_;
- std::vector<base::FilePath> paths_;
- std::unique_ptr<std::set<base::FilePath>> result_;
- size_t left_;
- CompletionCallback callback_;
- base::WeakPtrFactory<IsDirectoryCollector> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(IsDirectoryCollector);
-};
-
-} // namespace app_file_handler_util
-} // namespace extensions
-
-#endif // EXTENSIONS_BROWSER_API_FILE_HANDLERS_DIRECTORY_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698