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

Unified Diff: chrome/browser/extensions/crx_installer.h

Issue 6992047: Change the web store private install API to accept a localized extension name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased, removed test files I added in separate CL Created 9 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/crx_installer.h
diff --git a/chrome/browser/extensions/crx_installer.h b/chrome/browser/extensions/crx_installer.h
index 0cc9dc75cd81307499a16e9c1ef4b6a1d4ee6876..937fa4f053f159d9a91b94f28c663344ce8447ef 100644
--- a/chrome/browser/extensions/crx_installer.h
+++ b/chrome/browser/extensions/crx_installer.h
@@ -55,21 +55,25 @@ class CrxInstaller
// crbug.com/54916
static void SetWhitelistedInstallId(const std::string& id);
+ struct WhitelistEntry {
+ scoped_ptr<DictionaryValue> parsed_manifest;
+ std::string localized_name;
+ };
+
// Exempt the next extension install with |id| from displaying a confirmation
// prompt, since the user already agreed to the install via
// beginInstallWithManifest. We require that the extension manifest matches
- // |parsed_manifest| which is what was used to prompt with. Ownership of
- // |parsed_manifest| is transferred here.
- static void SetWhitelistedManifest(const std::string& id,
- DictionaryValue* parsed_manifest);
+ // the manifest in |entry|, which is what was used to prompt with. Ownership
+ // of |entry| is transferred here.
+ static void SetWhitelistEntry(const std::string& id, WhitelistEntry* entry);
- // Returns the previously stored manifest from a call to
- // SetWhitelistedManifest.
- static const DictionaryValue* GetWhitelistedManifest(const std::string& id);
+ // Returns the previously stored manifest from a call to SetWhitelistEntry.
+ static const CrxInstaller::WhitelistEntry* GetWhitelistEntry(
+ const std::string& id);
- // Removes any whitelisted manifest for |id| and returns it. The caller owns
+ // Removes any whitelist data for |id| and returns it. The caller owns
// the return value and is responsible for deleting it.
- static DictionaryValue* RemoveWhitelistedManifest(const std::string& id);
+ static WhitelistEntry* RemoveWhitelistEntry(const std::string& id);
// Returns whether |id| is whitelisted - only call this on the UI thread.
static bool IsIdWhitelisted(const std::string& id);
@@ -159,6 +163,7 @@ class CrxInstaller
virtual void OnUnpackFailure(const std::string& error_message);
virtual void OnUnpackSuccess(const FilePath& temp_dir,
const FilePath& extension_dir,
+ const DictionaryValue* original_manifest,
const Extension* extension);
// Returns true if we can skip confirmation because the install was
@@ -225,6 +230,10 @@ class CrxInstaller
// ExtensionService on success, or delete it on failure.
scoped_refptr<const Extension> extension_;
+ // A parsed copy of the unmodified original manifest, before any
+ // transformations like localization have taken place.
+ scoped_ptr<DictionaryValue> original_manifest_;
+
// If non-empty, contains the current version of the extension we're
// installing (for upgrades).
std::string current_version_;
« no previous file with comments | « no previous file | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698