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

Side by Side Diff: extensions/common/file_util.h

Issue 228073005: Move core extensions l10n code to //extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unused header is unused Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « extensions/common/extension_l10n_util_unittest.cc ('k') | extensions/common/file_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_COMMON_FILE_UTIL_H_ 5 #ifndef EXTENSIONS_COMMON_FILE_UTIL_H_
6 #define EXTENSIONS_COMMON_FILE_UTIL_H_ 6 #define EXTENSIONS_COMMON_FILE_UTIL_H_
7 7
8 #include <string>
9
10 #include "extensions/common/message_bundle.h"
11
8 class GURL; 12 class GURL;
9 13
10 namespace base { 14 namespace base {
11 class FilePath; 15 class FilePath;
12 } 16 }
13 17
14 namespace extensions { 18 namespace extensions {
15 namespace file_util { 19 namespace file_util {
16 20
17 // Get a relative file path from a chrome-extension:// URL. 21 // Get a relative file path from a chrome-extension:// URL.
18 base::FilePath ExtensionURLToRelativeFilePath(const GURL& url); 22 base::FilePath ExtensionURLToRelativeFilePath(const GURL& url);
19 23
20 // Get a full file path from a chrome-extension-resource:// URL, If the URL 24 // 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. 25 // points a file outside of root, this function will return empty FilePath.
22 base::FilePath ExtensionResourceURLToFilePath(const GURL& url, 26 base::FilePath ExtensionResourceURLToFilePath(const GURL& url,
23 const base::FilePath& root); 27 const base::FilePath& root);
24 28
29 // Loads extension message catalogs and returns message bundle.
30 // Returns NULL on error or if the extension is not localized.
31 MessageBundle* LoadMessageBundle(const base::FilePath& extension_path,
32 const std::string& default_locale,
33 std::string* error);
34
35 // Loads the extension message bundle substitution map. Contains at least
36 // the extension_id item.
37 MessageBundle::SubstitutionMap* LoadMessageBundleSubstitutionMap(
38 const base::FilePath& extension_path,
39 const std::string& extension_id,
40 const std::string& default_locale);
41
25 } // namespace file_util 42 } // namespace file_util
26 } // namespace extensions 43 } // namespace extensions
27 44
28 #endif // EXTENSIONS_COMMON_FILE_UTIL_H_ 45 #endif // EXTENSIONS_COMMON_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « extensions/common/extension_l10n_util_unittest.cc ('k') | extensions/common/file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698