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

Unified Diff: extensions/browser/extension_prefs.h

Issue 322893002: Cleanup: Make ExtensionService::OnExtensionInstalled take a bitmask instead of (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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
Index: extensions/browser/extension_prefs.h
diff --git a/extensions/browser/extension_prefs.h b/extensions/browser/extension_prefs.h
index 50bb03b8b28b4bf7fe865bb1b72b515ce4ba1713..a36a975c8864cf2b11df381de451c6d9d4df4bf7 100644
--- a/extensions/browser/extension_prefs.h
+++ b/extensions/browser/extension_prefs.h
@@ -20,6 +20,7 @@
#include "extensions/browser/app_sorting.h"
#include "extensions/browser/blacklist_state.h"
#include "extensions/browser/extension_scoped_prefs.h"
+#include "extensions/browser/install_flag.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/url_pattern_set.h"
@@ -184,15 +185,21 @@ class ExtensionPrefs : public ExtensionScopedPrefs, public KeyedService {
void SetKnownDisabled(const ExtensionIdSet& extension_ids);
// Called when an extension is installed, so that prefs get created.
- // |blacklisted_for_malware| should be set if the extension was included in a
- // blacklist due to being malware. If |page_ordinal| is an invalid ordinal,
- // then a page will be found for the App.
+ // If |page_ordinal| is invalid then a page will be found for the App.
+ // |install_flags| are a bitmask of extension::InstallFlags.
void OnExtensionInstalled(const Extension* extension,
Extension::State initial_state,
- bool blacklisted_for_malware,
- bool is_ephemeral,
const syncer::StringOrdinal& page_ordinal,
+ int install_flags,
const std::string& install_parameter);
+ // OnExtensionInstalled with no install flags.
+ void OnExtensionInstalled(const Extension* extension,
+ Extension::State initial_state,
+ const syncer::StringOrdinal& page_ordinal,
+ const std::string& install_parameter) {
+ OnExtensionInstalled(
+ extension, initial_state, page_ordinal, install_parameter);
xiyuan 2014/06/10 17:07:28 Seems missing the default install flags to call th
not at google - send to devlin 2014/06/10 17:08:42 yes, this is ... a terrifying infinite loop. thank
+ }
// Called when an extension is uninstalled, so that prefs get cleaned up.
void OnExtensionUninstalled(const std::string& extension_id,
@@ -444,10 +451,11 @@ class ExtensionPrefs : public ExtensionScopedPrefs, public KeyedService {
// We've downloaded an updated .crx file for the extension, but are waiting
// to install it.
+ //
+ // |install_flags| are a bitmask of extension::InstallFlags.
void SetDelayedInstallInfo(const Extension* extension,
Extension::State initial_state,
- bool blacklisted_for_malware,
- bool is_ephemeral,
+ int install_flags,
DelayReason delay_reason,
const syncer::StringOrdinal& page_ordinal,
const std::string& install_parameter);
@@ -676,11 +684,12 @@ class ExtensionPrefs : public ExtensionScopedPrefs, public KeyedService {
// by a newly installed extension. Work is broken up between this
// function and FinishExtensionInfoPrefs() to accomodate delayed
// installations.
+ //
+ // |install_flags| are a bitmask of extension::InstallFlags.
void PopulateExtensionInfoPrefs(const Extension* extension,
const base::Time install_time,
Extension::State initial_state,
- bool blacklisted_for_malware,
- bool is_ephemeral,
+ int install_flags,
const std::string& install_parameter,
base::DictionaryValue* extension_dict);
« no previous file with comments | « chrome/browser/ui/webui/extensions/install_extension_handler.cc ('k') | extensions/browser/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698