[Android] Lint pylib/host_driven.
[chromium-blink-merge.git] / extensions / common / file_util.h
blob3ec7adec5b7ae186889e762e386e3b6658f41bf8
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_COMMON_FILE_UTIL_H_
6 #define EXTENSIONS_COMMON_FILE_UTIL_H_
8 class GURL;
10 namespace base {
11 class FilePath;
14 namespace extensions {
15 namespace file_util {
17 // Get a relative file path from a chrome-extension:// URL.
18 base::FilePath ExtensionURLToRelativeFilePath(const GURL& url);
20 // Get a full file path from a chrome-extension-resource:// URL, If the URL
21 // points a file outside of root, this function will return empty FilePath.
22 base::FilePath ExtensionResourceURLToFilePath(const GURL& url,
23 const base::FilePath& root);
25 } // namespace file_util
26 } // namespace extensions
28 #endif // EXTENSIONS_COMMON_FILE_UTIL_H_