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

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

Issue 93883004: Sync the launch type pref for apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test for invalid value, make tests actually check things Created 7 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
Index: chrome/browser/extensions/launch_util.h
diff --git a/chrome/browser/extensions/launch_util.h b/chrome/browser/extensions/launch_util.h
index 0cdfb72fa484d4244b6c6822d1e399f4233055cd..cd5f69392849486e541d53d23bae33f71bd51c83 100644
--- a/chrome/browser/extensions/launch_util.h
+++ b/chrome/browser/extensions/launch_util.h
@@ -9,6 +9,8 @@
#include "chrome/common/extensions/extension_constants.h"
+class ExtensionService;
+
namespace extensions {
class Extension;
@@ -21,8 +23,13 @@ class ExtensionPrefs;
LaunchType GetLaunchType(const ExtensionPrefs* prefs,
const Extension* extension);
-// Sets an extension's launch type preference.
-void SetLaunchType(ExtensionPrefs* prefs,
+// Returns the LaunchType that is set in the prefs. Returns LAUNCH_TYPE_INVALID
+// if no value is set in prefs.
+LaunchType GetLaunchTypePrefValue(const ExtensionPrefs* prefs,
+ const std::string& extension_id);
+
+// Sets an extension's launch type preference and syncs the value if necessary.
+void SetLaunchType(ExtensionService* prefs,
const std::string& extension_id,
LaunchType launch_type);

Powered by Google App Engine
This is Rietveld 408576698