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

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

Issue 11465016: Dedupe code in SetIdleInstallInfo(), FinishIdleInstallInfo() and OnExtensionInstalled(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix logic bug and add comment. Created 8 years 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/extension_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.h
diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h
index 1908716e44575a068f75bf22b81ccabc3ba33ed8..88a7d0bc1fcf579c143c3f34d3690de34d611db6 100644
--- a/chrome/browser/extensions/extension_prefs.h
+++ b/chrome/browser/extensions/extension_prefs.h
@@ -385,7 +385,8 @@ class ExtensionPrefs : public ContentSettingsStore::Observer,
// We've downloaded an updated .crx file for the extension, but are waiting
// for idle time to install it.
void SetIdleInstallInfo(const Extension* extension,
- Extension::State initial_state);
+ Extension::State initial_state,
+ const syncer::StringOrdinal& page_ordinal);
// Removes any idle install information we have for the given |extension_id|.
// Returns true if there was info to remove; false otherwise.
@@ -607,6 +608,25 @@ class ExtensionPrefs : public ContentSettingsStore::Observer,
void SetExtensionPrefFromVector(const char* pref,
const ExtensionIdList& extension_ids);
+ // Helper function to populate |extension_dict| with the values needed
+ // by a newly installed extension. Work is broken up between this
+ // function and FinishExtensionInfoPrefs() to accomodate delayed
+ // installations.
+ void PopulateExtensionInfoPrefs(const Extension* extension,
+ const base::Time install_time,
+ Extension::State initial_state,
+ DictionaryValue* extension_dict);
+
+ // Helper function to complete initialization of the values in
+ // |extension_dict| for an extension install. Also see
+ // PopulateExtensionInfoPrefs().
+ void FinishExtensionInfoPrefs(
+ const std::string& extension_id,
+ const base::Time install_time,
+ bool needs_sort_ordinal,
+ const syncer::StringOrdinal& suggested_page_ordinal,
+ DictionaryValue* extension_dict);
+
// The pref service specific to this set of extension prefs. Owned by profile.
PrefService* prefs_;
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698