| Index: chrome/browser/extensions/extension_prefs.cc
|
| diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
|
| index 12389aca592eddd0222ef4840511a5a3cbeaffed..8cf771a91536532251bbc5cf15636970793b1757 100644
|
| --- a/chrome/browser/extensions/extension_prefs.cc
|
| +++ b/chrome/browser/extensions/extension_prefs.cc
|
| @@ -40,6 +40,9 @@ namespace {
|
|
|
| // Additional preferences keys
|
|
|
| +// Whether this extension was running when chrome last shutdown.
|
| +const char kPrefRunning[] = "running";
|
| +
|
| // Where an extension was installed from. (see Extension::Location)
|
| const char kPrefLocation[] = "location";
|
|
|
| @@ -1142,6 +1145,21 @@ void ExtensionPrefs::SetRegisteredEvents(
|
| UpdateExtensionPref(extension_id, kRegisteredEvents, value);
|
| }
|
|
|
| +void ExtensionPrefs::SetExtensionRunning(const std::string& extension_id,
|
| + bool is_running) {
|
| + Value* value = Value::CreateBooleanValue(is_running);
|
| + UpdateExtensionPref(extension_id, kPrefRunning, value);
|
| +}
|
| +
|
| +bool ExtensionPrefs::IsExtensionRunning(const std::string& extension_id) {
|
| + const DictionaryValue* extension = GetExtensionPref(extension_id);
|
| + if (!extension)
|
| + return false;
|
| + bool running = false;
|
| + extension->GetBoolean(kPrefRunning, &running);
|
| + return running;
|
| +}
|
| +
|
| ExtensionOmniboxSuggestion
|
| ExtensionPrefs::GetOmniboxDefaultSuggestion(const std::string& extension_id) {
|
| ExtensionOmniboxSuggestion suggestion;
|
|
|