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

Side by Side Diff: chrome/common/extensions/extension_l10n_util.h

Issue 12578008: Move CrxFile, FileReader, ExtensionResource to src/extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This file declares extension specific l10n utils. 5 // This file declares extension specific l10n utils.
6 6
7 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_ 7 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_
8 #define CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_ 8 #define CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_
9 9
10 #include <set> 10 #include <set>
(...skipping 17 matching lines...) Expand all
28 // the sandboxed utility process, where file reading is not allowed. 28 // the sandboxed utility process, where file reading is not allowed.
29 void SetProcessLocale(const std::string& locale); 29 void SetProcessLocale(const std::string& locale);
30 30
31 // Returns default locale in form "en-US" or "sr" or empty string if 31 // Returns default locale in form "en-US" or "sr" or empty string if
32 // "default_locale" section was not defined in the manifest.json file. 32 // "default_locale" section was not defined in the manifest.json file.
33 std::string GetDefaultLocaleFromManifest(const base::DictionaryValue& manifest, 33 std::string GetDefaultLocaleFromManifest(const base::DictionaryValue& manifest,
34 std::string* error); 34 std::string* error);
35 35
36 // Returns true iff the extension was localized, and the current locale 36 // Returns true iff the extension was localized, and the current locale
37 // doesn't match the locale written into info.extension_manifest. 37 // doesn't match the locale written into info.extension_manifest.
38 bool ShouldRelocalizeManifest(const extensions::ExtensionInfo& info); 38 bool ShouldRelocalizeManifest(base::DictionaryValue* const manifest);
Jeffrey Yasskin 2013/03/22 20:26:50 "const" after the * has no effect in a declaration
Yoyo Zhou 2013/03/22 21:33:32 Changed to const base::DictionaryValue*
39 39
40 // Localize extension name, description, browser_action and other fields 40 // Localize extension name, description, browser_action and other fields
41 // in the manifest. 41 // in the manifest.
42 bool LocalizeManifest(const extensions::MessageBundle& messages, 42 bool LocalizeManifest(const extensions::MessageBundle& messages,
43 base::DictionaryValue* manifest, 43 base::DictionaryValue* manifest,
44 std::string* error); 44 std::string* error);
45 45
46 // Load message catalogs, localize manifest and attach message bundle to the 46 // Load message catalogs, localize manifest and attach message bundle to the
47 // extension. 47 // extension.
48 bool LocalizeExtension(const base::FilePath& extension_path, 48 bool LocalizeExtension(const base::FilePath& extension_path,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 ~ScopedLocaleForTest(); 120 ~ScopedLocaleForTest();
121 121
122 private: 122 private:
123 std::string locale_; // The current locale at ctor time. 123 std::string locale_; // The current locale at ctor time.
124 }; 124 };
125 125
126 126
127 } // namespace extension_l10n_util 127 } // namespace extension_l10n_util
128 128
129 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_ 129 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698