Index: extensions/browser/extension_prefs.cc |
diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc |
index 657da2190da86ae51bae0db10f2bfb0c4f799787..5b7020dbcc36a0da82f46891e7102fd41da65561 100644 |
--- a/extensions/browser/extension_prefs.cc |
+++ b/extensions/browser/extension_prefs.cc |
@@ -673,7 +673,7 @@ int ExtensionPrefs::IncrementAcknowledgePromptCount( |
ReadPrefAsInteger(extension_id, kPrefAcknowledgePromptCount, &count); |
++count; |
UpdateExtensionPref(extension_id, kPrefAcknowledgePromptCount, |
- new base::FundamentalValue(count)); |
+ new base::Value(count)); |
return count; |
} |
@@ -686,7 +686,7 @@ void ExtensionPrefs::AcknowledgeExternalExtension( |
const std::string& extension_id) { |
DCHECK(crx_file::id_util::IdIsValid(extension_id)); |
UpdateExtensionPref(extension_id, kPrefExternalAcknowledged, |
- new base::FundamentalValue(true)); |
+ new base::Value(true)); |
UpdateExtensionPref(extension_id, kPrefAcknowledgePromptCount, NULL); |
} |
@@ -699,7 +699,7 @@ void ExtensionPrefs::AcknowledgeBlacklistedExtension( |
const std::string& extension_id) { |
DCHECK(crx_file::id_util::IdIsValid(extension_id)); |
UpdateExtensionPref(extension_id, kPrefBlacklistAcknowledged, |
- new base::FundamentalValue(true)); |
+ new base::Value(true)); |
UpdateExtensionPref(extension_id, kPrefAcknowledgePromptCount, NULL); |
} |
@@ -712,7 +712,7 @@ void ExtensionPrefs::SetExternalInstallFirstRun( |
const std::string& extension_id) { |
DCHECK(crx_file::id_util::IdIsValid(extension_id)); |
UpdateExtensionPref(extension_id, kPrefExternalInstallFirstRun, |
- new base::FundamentalValue(true)); |
+ new base::Value(true)); |
} |
bool ExtensionPrefs::SetAlertSystemFirstRun() { |
@@ -799,9 +799,8 @@ void ExtensionPrefs::ModifyDisableReasons(const std::string& extension_id, |
if (new_value == Extension::DISABLE_NONE) { |
UpdateExtensionPref(extension_id, kPrefDisableReasons, NULL); |
} else { |
- UpdateExtensionPref(extension_id, |
- kPrefDisableReasons, |
- new base::FundamentalValue(new_value)); |
+ UpdateExtensionPref(extension_id, kPrefDisableReasons, |
+ new base::Value(new_value)); |
} |
for (auto& observer : observer_list_) |
@@ -842,9 +841,7 @@ void ExtensionPrefs::SetExtensionBlacklisted(const std::string& extension_id, |
UpdateExtensionPref(extension_id, kPrefBlacklistAcknowledged, NULL); |
if (is_blacklisted) { |
- UpdateExtensionPref(extension_id, |
- kPrefBlacklist, |
- new base::FundamentalValue(true)); |
+ UpdateExtensionPref(extension_id, kPrefBlacklist, new base::Value(true)); |
} else { |
UpdateExtensionPref(extension_id, kPrefBlacklist, NULL); |
const base::DictionaryValue* dict = GetExtensionPref(extension_id); |
@@ -949,8 +946,7 @@ bool ExtensionPrefs::GetActiveBit(const std::string& extension_id) const { |
void ExtensionPrefs::SetActiveBit(const std::string& extension_id, |
bool active) { |
- UpdateExtensionPref(extension_id, kActiveBit, |
- new base::FundamentalValue(active)); |
+ UpdateExtensionPref(extension_id, kActiveBit, new base::Value(active)); |
} |
std::unique_ptr<const PermissionSet> ExtensionPrefs::GetGrantedPermissions( |
@@ -1000,7 +996,7 @@ void ExtensionPrefs::SetActivePermissions(const std::string& extension_id, |
void ExtensionPrefs::SetExtensionRunning(const std::string& extension_id, |
bool is_running) { |
- base::Value* value = new base::FundamentalValue(is_running); |
+ base::Value* value = new base::Value(is_running); |
UpdateExtensionPref(extension_id, kPrefRunning, value); |
} |
@@ -1015,7 +1011,7 @@ bool ExtensionPrefs::IsExtensionRunning(const std::string& extension_id) const { |
void ExtensionPrefs::SetIsActive(const std::string& extension_id, |
bool is_active) { |
- base::Value* value = new base::FundamentalValue(is_active); |
+ base::Value* value = new base::Value(is_active); |
UpdateExtensionPref(extension_id, kIsActive, value); |
} |
@@ -1035,7 +1031,7 @@ bool ExtensionPrefs::IsIncognitoEnabled(const std::string& extension_id) const { |
void ExtensionPrefs::SetIsIncognitoEnabled(const std::string& extension_id, |
bool enabled) { |
UpdateExtensionPref(extension_id, kPrefIncognitoEnabled, |
- new base::FundamentalValue(enabled)); |
+ new base::Value(enabled)); |
extension_pref_value_map_->SetExtensionIncognitoState(extension_id, enabled); |
} |
@@ -1046,7 +1042,7 @@ bool ExtensionPrefs::AllowFileAccess(const std::string& extension_id) const { |
void ExtensionPrefs::SetAllowFileAccess(const std::string& extension_id, |
bool allow) { |
UpdateExtensionPref(extension_id, kPrefAllowFileAccess, |
- new base::FundamentalValue(allow)); |
+ new base::Value(allow)); |
} |
bool ExtensionPrefs::HasAllowFileAccessSetting( |
@@ -1120,9 +1116,9 @@ void ExtensionPrefs::OnExtensionUninstalled(const std::string& extension_id, |
// true, which signifies that the registry key was deleted or the pref file |
// no longer lists the extension). |
if (!external_uninstall && Manifest::IsExternalLocation(location)) { |
- UpdateExtensionPref(extension_id, kPrefState, |
- new base::FundamentalValue( |
- Extension::EXTERNAL_EXTENSION_UNINSTALLED)); |
+ UpdateExtensionPref( |
+ extension_id, kPrefState, |
+ new base::Value(Extension::EXTERNAL_EXTENSION_UNINSTALLED)); |
extension_pref_value_map_->SetExtensionState(extension_id, false); |
for (auto& observer : observer_list_) |
observer.OnExtensionStateChanged(extension_id, false); |
@@ -1133,7 +1129,7 @@ void ExtensionPrefs::OnExtensionUninstalled(const std::string& extension_id, |
void ExtensionPrefs::SetExtensionEnabled(const std::string& extension_id) { |
UpdateExtensionPref(extension_id, kPrefState, |
- new base::FundamentalValue(Extension::ENABLED)); |
+ new base::Value(Extension::ENABLED)); |
extension_pref_value_map_->SetExtensionState(extension_id, true); |
UpdateExtensionPref(extension_id, kPrefDisableReasons, nullptr); |
for (auto& observer : observer_list_) |
@@ -1144,11 +1140,11 @@ void ExtensionPrefs::SetExtensionDisabled(const std::string& extension_id, |
int disable_reasons) { |
if (!IsExternalExtensionUninstalled(extension_id)) { |
UpdateExtensionPref(extension_id, kPrefState, |
- new base::FundamentalValue(Extension::DISABLED)); |
+ new base::Value(Extension::DISABLED)); |
extension_pref_value_map_->SetExtensionState(extension_id, false); |
} |
UpdateExtensionPref(extension_id, kPrefDisableReasons, |
- new base::FundamentalValue(disable_reasons)); |
+ new base::Value(disable_reasons)); |
for (auto& observer : observer_list_) |
observer.OnExtensionStateChanged(extension_id, false); |
} |
@@ -1157,7 +1153,7 @@ void ExtensionPrefs::SetExtensionBlacklistState(const std::string& extension_id, |
BlacklistState state) { |
SetExtensionBlacklisted(extension_id, state == BLACKLISTED_MALWARE); |
UpdateExtensionPref(extension_id, kPrefBlacklistState, |
- new base::FundamentalValue(state)); |
+ new base::Value(state)); |
} |
BlacklistState ExtensionPrefs::GetExtensionBlacklistState( |
@@ -1442,8 +1438,7 @@ bool ExtensionPrefs::WasAppDraggedByUser( |
} |
void ExtensionPrefs::SetAppDraggedByUser(const std::string& extension_id) { |
- UpdateExtensionPref(extension_id, kPrefUserDraggedApp, |
- new base::FundamentalValue(true)); |
+ UpdateExtensionPref(extension_id, kPrefUserDraggedApp, new base::Value(true)); |
} |
bool ExtensionPrefs::IsFromWebStore( |
@@ -1726,7 +1721,7 @@ bool ExtensionPrefs::NeedsSync(const std::string& extension_id) const { |
void ExtensionPrefs::SetNeedsSync(const std::string& extension_id, |
bool needs_sync) { |
UpdateExtensionPref(extension_id, kPrefNeedsSync, |
- needs_sync ? new base::FundamentalValue(true) : nullptr); |
+ needs_sync ? new base::Value(true) : nullptr); |
} |
ExtensionPrefs::ExtensionPrefs( |
@@ -1843,26 +1838,23 @@ void ExtensionPrefs::PopulateExtensionInfoPrefs( |
int install_flags, |
const std::string& install_parameter, |
base::DictionaryValue* extension_dict) const { |
- extension_dict->Set(kPrefState, new base::FundamentalValue(initial_state)); |
- extension_dict->Set(kPrefLocation, |
- new base::FundamentalValue(extension->location())); |
+ extension_dict->Set(kPrefState, new base::Value(initial_state)); |
+ extension_dict->Set(kPrefLocation, new base::Value(extension->location())); |
extension_dict->Set(kPrefCreationFlags, |
- new base::FundamentalValue(extension->creation_flags())); |
+ new base::Value(extension->creation_flags())); |
extension_dict->Set(kPrefFromWebStore, |
- new base::FundamentalValue(extension->from_webstore())); |
+ new base::Value(extension->from_webstore())); |
extension_dict->Set(kPrefFromBookmark, |
- new base::FundamentalValue(extension->from_bookmark())); |
- extension_dict->Set( |
- kPrefWasInstalledByDefault, |
- new base::FundamentalValue(extension->was_installed_by_default())); |
- extension_dict->Set( |
- kPrefWasInstalledByOem, |
- new base::FundamentalValue(extension->was_installed_by_oem())); |
+ new base::Value(extension->from_bookmark())); |
+ extension_dict->Set(kPrefWasInstalledByDefault, |
+ new base::Value(extension->was_installed_by_default())); |
+ extension_dict->Set(kPrefWasInstalledByOem, |
+ new base::Value(extension->was_installed_by_oem())); |
extension_dict->Set(kPrefInstallTime, |
new base::StringValue( |
base::Int64ToString(install_time.ToInternalValue()))); |
if (install_flags & kInstallFlagIsBlacklistedForMalware) |
- extension_dict->Set(kPrefBlacklist, new base::FundamentalValue(true)); |
+ extension_dict->Set(kPrefBlacklist, new base::Value(true)); |
base::FilePath::StringType path = MakePathRelative(install_directory_, |
extension->path()); |
@@ -1880,7 +1872,7 @@ void ExtensionPrefs::PopulateExtensionInfoPrefs( |
// Only writes kPrefDoNotSync when it is not the default. |
if (install_flags & kInstallFlagDoNotSync) |
- extension_dict->Set(kPrefDoNotSync, new base::FundamentalValue(true)); |
+ extension_dict->Set(kPrefDoNotSync, new base::Value(true)); |
else |
extension_dict->Remove(kPrefDoNotSync, NULL); |
} |