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

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

Issue 2685453002: Move file_handlers API from //chrome to //extensions (Closed)
Patch Set: rebase 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/app_file_handler_util.h
diff --git a/chrome/browser/extensions/api/file_handlers/app_file_handler_util.h b/extensions/browser/api/file_handlers/app_file_handler_util.h
similarity index 85%
rename from chrome/browser/extensions/api/file_handlers/app_file_handler_util.h
rename to extensions/browser/api/file_handlers/app_file_handler_util.h
index 28d19db19486cb3a51b3471aa561e805adc3a0b2..1951f116926da77388e27dd389bc75aa70496517 100644
--- a/chrome/browser/extensions/api/file_handlers/app_file_handler_util.h
+++ b/extensions/browser/api/file_handlers/app_file_handler_util.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_EXTENSIONS_API_FILE_HANDLERS_APP_FILE_HANDLER_UTIL_H_
-#define CHROME_BROWSER_EXTENSIONS_API_FILE_HANDLERS_APP_FILE_HANDLER_UTIL_H_
+#ifndef EXTENSIONS_BROWSER_API_FILE_HANDLERS_APP_FILE_HANDLER_UTIL_H_
+#define EXTENSIONS_BROWSER_API_FILE_HANDLERS_APP_FILE_HANDLER_UTIL_H_
#include <set>
#include <string>
@@ -14,7 +14,9 @@
#include "extensions/common/extension.h"
#include "extensions/common/manifest_handlers/file_handler_info.h"
-class Profile;
+namespace content {
+class BrowserContext;
+}
namespace extensions {
@@ -22,7 +24,8 @@ struct EntryInfo;
struct FileHandlerInfo;
struct GrantedFileEntry;
-// TODO(benwells): move this to platform_apps namespace.
+// TODO(michaelpg,benwells): move this to an app-specific namespace and
+// directory.
namespace app_file_handler_util {
extern const char kInvalidParameters[];
@@ -43,7 +46,7 @@ bool FileHandlerCanHandleEntry(const FileHandlerInfo& handler,
// Creates a new file entry and allows |renderer_id| to access |path|. This
// registers a new file system for |path|.
-GrantedFileEntry CreateFileEntry(Profile* profile,
+GrantedFileEntry CreateFileEntry(content::BrowserContext* context,
const Extension* extension,
int renderer_id,
const base::FilePath& path,
@@ -56,7 +59,7 @@ GrantedFileEntry CreateFileEntry(Profile* profile,
// otherwise calls |on_failure|.
void PrepareFilesForWritableApp(
const std::vector<base::FilePath>& paths,
- Profile* profile,
+ content::BrowserContext* context,
const std::set<base::FilePath>& directory_paths,
const base::Closure& on_success,
const base::Callback<void(const base::FilePath&)>& on_failure);
@@ -76,4 +79,4 @@ bool ValidateFileEntryAndGetPath(const std::string& filesystem_name,
} // namespace extensions
-#endif // CHROME_BROWSER_EXTENSIONS_API_FILE_HANDLERS_APP_FILE_HANDLER_UTIL_H_
+#endif // EXTENSIONS_BROWSER_API_FILE_HANDLERS_APP_FILE_HANDLER_UTIL_H_
« no previous file with comments | « extensions/browser/api/file_handlers/OWNERS ('k') | extensions/browser/api/file_handlers/app_file_handler_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698