OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/extension_prefs.h" | 5 #include "chrome/browser/extensions/extension_prefs.h" |
6 | 6 |
7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/extensions/admin_policy.h" | 10 #include "chrome/browser/extensions/admin_policy.h" |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 Value::CreateIntegerValue(new_value)); | 739 Value::CreateIntegerValue(new_value)); |
740 } | 740 } |
741 } | 741 } |
742 | 742 |
743 void ExtensionPrefs::ClearDisableReasons(const std::string& extension_id) { | 743 void ExtensionPrefs::ClearDisableReasons(const std::string& extension_id) { |
744 UpdateExtensionPref(extension_id, kPrefDisableReasons, NULL); | 744 UpdateExtensionPref(extension_id, kPrefDisableReasons, NULL); |
745 } | 745 } |
746 | 746 |
747 void ExtensionPrefs::UpdateBlacklist( | 747 void ExtensionPrefs::UpdateBlacklist( |
748 const std::set<std::string>& blacklist_set) { | 748 const std::set<std::string>& blacklist_set) { |
749 ExtensionIdSet remove_pref_ids; | 749 ExtensionIds remove_pref_ids; |
750 std::set<std::string> used_id_set; | 750 std::set<std::string> used_id_set; |
751 const DictionaryValue* extensions = prefs_->GetDictionary(kExtensionsPref); | 751 const DictionaryValue* extensions = prefs_->GetDictionary(kExtensionsPref); |
752 | 752 |
753 if (extensions) { | 753 if (extensions) { |
754 for (DictionaryValue::key_iterator extension_id = extensions->begin_keys(); | 754 for (DictionaryValue::key_iterator extension_id = extensions->begin_keys(); |
755 extension_id != extensions->end_keys(); ++extension_id) { | 755 extension_id != extensions->end_keys(); ++extension_id) { |
756 const DictionaryValue* ext; | 756 const DictionaryValue* ext; |
757 if (!extensions->GetDictionaryWithoutPathExpansion(*extension_id, &ext)) { | 757 if (!extensions->GetDictionaryWithoutPathExpansion(*extension_id, &ext)) { |
758 NOTREACHED() << "Invalid pref for extension " << *extension_id; | 758 NOTREACHED() << "Invalid pref for extension " << *extension_id; |
759 continue; | 759 continue; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 return result; | 868 return result; |
869 return false; | 869 return false; |
870 } | 870 } |
871 | 871 |
872 void ExtensionPrefs::SetActiveBit(const std::string& extension_id, | 872 void ExtensionPrefs::SetActiveBit(const std::string& extension_id, |
873 bool active) { | 873 bool active) { |
874 UpdateExtensionPref(extension_id, kActiveBit, | 874 UpdateExtensionPref(extension_id, kActiveBit, |
875 Value::CreateBooleanValue(active)); | 875 Value::CreateBooleanValue(active)); |
876 } | 876 } |
877 | 877 |
878 void ExtensionPrefs::MigratePermissions(const ExtensionIdSet& extension_ids) { | 878 void ExtensionPrefs::MigratePermissions(const ExtensionIds& extension_ids) { |
879 PermissionsInfo* info = PermissionsInfo::GetInstance(); | 879 PermissionsInfo* info = PermissionsInfo::GetInstance(); |
880 for (ExtensionIdSet::const_iterator ext_id = | 880 for (ExtensionIds::const_iterator ext_id = |
881 extension_ids.begin(); ext_id != extension_ids.end(); ++ext_id) { | 881 extension_ids.begin(); ext_id != extension_ids.end(); ++ext_id) { |
882 | 882 |
883 // An extension's granted permissions need to be migrated if the | 883 // An extension's granted permissions need to be migrated if the |
884 // full_access bit is present. This bit was always present in the previous | 884 // full_access bit is present. This bit was always present in the previous |
885 // scheme and is never present now. | 885 // scheme and is never present now. |
886 bool full_access; | 886 bool full_access; |
887 const DictionaryValue* ext = GetExtensionPref(*ext_id); | 887 const DictionaryValue* ext = GetExtensionPref(*ext_id); |
888 if (!ext || !ext->GetBoolean(kPrefOldGrantedFullAccess, &full_access)) | 888 if (!ext || !ext->GetBoolean(kPrefOldGrantedFullAccess, &full_access)) |
889 continue; | 889 continue; |
890 | 890 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 UpdateExtensionPref( | 923 UpdateExtensionPref( |
924 *ext_id, explicit_hosts, hosts->DeepCopy()); | 924 *ext_id, explicit_hosts, hosts->DeepCopy()); |
925 | 925 |
926 // We can get rid of the old one by setting it to an empty list. | 926 // We can get rid of the old one by setting it to an empty list. |
927 UpdateExtensionPref(*ext_id, kPrefOldGrantedHosts, new ListValue()); | 927 UpdateExtensionPref(*ext_id, kPrefOldGrantedHosts, new ListValue()); |
928 } | 928 } |
929 } | 929 } |
930 } | 930 } |
931 | 931 |
932 void ExtensionPrefs::MigrateDisableReasons( | 932 void ExtensionPrefs::MigrateDisableReasons( |
933 const ExtensionIdSet& extension_ids) { | 933 const ExtensionIds& extension_ids) { |
934 for (ExtensionIdSet::const_iterator ext_id = | 934 for (ExtensionIds::const_iterator ext_id = |
935 extension_ids.begin(); ext_id != extension_ids.end(); ++ext_id) { | 935 extension_ids.begin(); ext_id != extension_ids.end(); ++ext_id) { |
936 int value = -1; | 936 int value = -1; |
937 if (ReadExtensionPrefInteger(*ext_id, kDeprecatedPrefDisableReason, | 937 if (ReadExtensionPrefInteger(*ext_id, kDeprecatedPrefDisableReason, |
938 &value)) { | 938 &value)) { |
939 int new_value = Extension::DISABLE_NONE; | 939 int new_value = Extension::DISABLE_NONE; |
940 switch (value) { | 940 switch (value) { |
941 case Extension::DEPRECATED_DISABLE_USER_ACTION: | 941 case Extension::DEPRECATED_DISABLE_USER_ACTION: |
942 new_value = Extension::DISABLE_USER_ACTION; | 942 new_value = Extension::DISABLE_USER_ACTION; |
943 break; | 943 break; |
944 case Extension::DEPRECATED_DISABLE_PERMISSIONS_INCREASE: | 944 case Extension::DEPRECATED_DISABLE_PERMISSIONS_INCREASE: |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1365 bool ExtensionPrefs::IsExternalExtensionUninstalled( | 1365 bool ExtensionPrefs::IsExternalExtensionUninstalled( |
1366 const std::string& id) const { | 1366 const std::string& id) const { |
1367 return DoesExtensionHaveState(id, Extension::EXTERNAL_EXTENSION_UNINSTALLED); | 1367 return DoesExtensionHaveState(id, Extension::EXTERNAL_EXTENSION_UNINSTALLED); |
1368 } | 1368 } |
1369 | 1369 |
1370 bool ExtensionPrefs::IsExtensionDisabled( | 1370 bool ExtensionPrefs::IsExtensionDisabled( |
1371 const std::string& id) const { | 1371 const std::string& id) const { |
1372 return DoesExtensionHaveState(id, Extension::DISABLED); | 1372 return DoesExtensionHaveState(id, Extension::DISABLED); |
1373 } | 1373 } |
1374 | 1374 |
1375 ExtensionPrefs::ExtensionIdSet ExtensionPrefs::GetToolbarOrder() { | 1375 ExtensionPrefs::ExtensionIds ExtensionPrefs::GetToolbarOrder() { |
1376 return GetExtensionPrefAsVector(GetToolbarOrderKeyName()); | 1376 return GetExtensionPrefAsVector(GetToolbarOrderKeyName()); |
1377 } | 1377 } |
1378 | 1378 |
1379 void ExtensionPrefs::SetToolbarOrder(const ExtensionIdSet& extension_ids) { | 1379 void ExtensionPrefs::SetToolbarOrder(const ExtensionIds& extension_ids) { |
1380 SetExtensionPrefFromVector(GetToolbarOrderKeyName(), extension_ids); | 1380 SetExtensionPrefFromVector(GetToolbarOrderKeyName(), extension_ids); |
1381 } | 1381 } |
1382 | 1382 |
1383 ExtensionPrefs::ExtensionIdSet ExtensionPrefs::GetActionBoxOrder() { | 1383 ExtensionPrefs::ExtensionIds ExtensionPrefs::GetActionBoxOrder() { |
1384 return GetExtensionPrefAsVector(kExtensionActionBox); | 1384 return GetExtensionPrefAsVector(kExtensionActionBox); |
1385 } | 1385 } |
1386 | 1386 |
1387 void ExtensionPrefs::SetActionBoxOrder(const ExtensionIdSet& extension_ids) { | 1387 void ExtensionPrefs::SetActionBoxOrder(const ExtensionIds& extension_ids) { |
1388 SetExtensionPrefFromVector(kExtensionActionBox, extension_ids); | 1388 SetExtensionPrefFromVector(kExtensionActionBox, extension_ids); |
1389 } | 1389 } |
1390 | 1390 |
1391 void ExtensionPrefs::OnExtensionInstalled( | 1391 void ExtensionPrefs::OnExtensionInstalled( |
1392 const Extension* extension, | 1392 const Extension* extension, |
1393 Extension::State initial_state, | 1393 Extension::State initial_state, |
1394 bool from_webstore, | 1394 bool from_webstore, |
1395 const StringOrdinal& page_ordinal) { | 1395 const StringOrdinal& page_ordinal) { |
1396 const std::string& id = extension->id(); | 1396 const std::string& id = extension->id(); |
1397 CHECK(Extension::IdIsValid(id)); | 1397 CHECK(Extension::IdIsValid(id)); |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1845 } | 1845 } |
1846 std::string install_time_str; | 1846 std::string install_time_str; |
1847 if (!extension->GetString(kPrefInstallTime, &install_time_str)) | 1847 if (!extension->GetString(kPrefInstallTime, &install_time_str)) |
1848 return base::Time(); | 1848 return base::Time(); |
1849 int64 install_time_i64 = 0; | 1849 int64 install_time_i64 = 0; |
1850 if (!base::StringToInt64(install_time_str, &install_time_i64)) | 1850 if (!base::StringToInt64(install_time_str, &install_time_i64)) |
1851 return base::Time(); | 1851 return base::Time(); |
1852 return base::Time::FromInternalValue(install_time_i64); | 1852 return base::Time::FromInternalValue(install_time_i64); |
1853 } | 1853 } |
1854 | 1854 |
1855 void ExtensionPrefs::GetExtensions(ExtensionIdSet* out) { | 1855 void ExtensionPrefs::GetExtensions(ExtensionIds* out) { |
1856 CHECK(out); | 1856 CHECK(out); |
1857 | 1857 |
1858 scoped_ptr<ExtensionsInfo> extensions_info(GetInstalledExtensionsInfo()); | 1858 scoped_ptr<ExtensionsInfo> extensions_info(GetInstalledExtensionsInfo()); |
1859 | 1859 |
1860 for (size_t i = 0; i < extensions_info->size(); ++i) { | 1860 for (size_t i = 0; i < extensions_info->size(); ++i) { |
1861 ExtensionInfo* info = extensions_info->at(i).get(); | 1861 ExtensionInfo* info = extensions_info->at(i).get(); |
1862 out->push_back(info->extension_id); | 1862 out->push_back(info->extension_id); |
1863 } | 1863 } |
1864 } | 1864 } |
1865 | 1865 |
1866 // static | 1866 // static |
1867 ExtensionPrefs::ExtensionIdSet ExtensionPrefs::GetExtensionsFrom( | 1867 ExtensionPrefs::ExtensionIds ExtensionPrefs::GetExtensionsFrom( |
1868 const base::DictionaryValue* extension_prefs) { | 1868 const base::DictionaryValue* extension_prefs) { |
1869 ExtensionIdSet result; | 1869 ExtensionIds result; |
1870 for (base::DictionaryValue::key_iterator it = extension_prefs->begin_keys(); | 1870 for (base::DictionaryValue::key_iterator it = extension_prefs->begin_keys(); |
1871 it != extension_prefs->end_keys(); ++it) { | 1871 it != extension_prefs->end_keys(); ++it) { |
1872 const DictionaryValue* ext; | 1872 const DictionaryValue* ext; |
1873 if (!extension_prefs->GetDictionaryWithoutPathExpansion(*it, &ext)) { | 1873 if (!extension_prefs->GetDictionaryWithoutPathExpansion(*it, &ext)) { |
1874 NOTREACHED() << "Invalid pref for extension " << *it; | 1874 NOTREACHED() << "Invalid pref for extension " << *it; |
1875 continue; | 1875 continue; |
1876 } | 1876 } |
1877 if (!IsBlacklistBitSet(ext)) | 1877 if (!IsBlacklistBitSet(ext)) |
1878 result.push_back(*it); | 1878 result.push_back(*it); |
1879 } | 1879 } |
1880 return result; | 1880 return result; |
1881 } | 1881 } |
1882 | 1882 |
1883 void ExtensionPrefs::FixMissingPrefs(const ExtensionIdSet& extension_ids) { | 1883 void ExtensionPrefs::FixMissingPrefs(const ExtensionIds& extension_ids) { |
1884 // Fix old entries that did not get an installation time entry when they | 1884 // Fix old entries that did not get an installation time entry when they |
1885 // were installed or don't have a preferences field. | 1885 // were installed or don't have a preferences field. |
1886 for (ExtensionIdSet::const_iterator ext_id = extension_ids.begin(); | 1886 for (ExtensionIds::const_iterator ext_id = extension_ids.begin(); |
1887 ext_id != extension_ids.end(); ++ext_id) { | 1887 ext_id != extension_ids.end(); ++ext_id) { |
1888 if (GetInstallTime(*ext_id) == base::Time()) { | 1888 if (GetInstallTime(*ext_id) == base::Time()) { |
1889 LOG(INFO) << "Could not parse installation time of extension " | 1889 LOG(INFO) << "Could not parse installation time of extension " |
1890 << *ext_id << ". It was probably installed before setting " | 1890 << *ext_id << ". It was probably installed before setting " |
1891 << kPrefInstallTime << " was introduced. Updating " | 1891 << kPrefInstallTime << " was introduced. Updating " |
1892 << kPrefInstallTime << " to the current time."; | 1892 << kPrefInstallTime << " to the current time."; |
1893 const base::Time install_time = GetCurrentTime(); | 1893 const base::Time install_time = GetCurrentTime(); |
1894 UpdateExtensionPref(*ext_id, kPrefInstallTime, Value::CreateStringValue( | 1894 UpdateExtensionPref(*ext_id, kPrefInstallTime, Value::CreateStringValue( |
1895 base::Int64ToString(install_time.ToInternalValue()))); | 1895 base::Int64ToString(install_time.ToInternalValue()))); |
1896 } | 1896 } |
(...skipping 20 matching lines...) Expand all Loading... |
1917 } | 1917 } |
1918 | 1918 |
1919 void ExtensionPrefs::InitPrefStore(bool extensions_disabled) { | 1919 void ExtensionPrefs::InitPrefStore(bool extensions_disabled) { |
1920 if (extensions_disabled) { | 1920 if (extensions_disabled) { |
1921 extension_pref_value_map_->NotifyInitializationCompleted(); | 1921 extension_pref_value_map_->NotifyInitializationCompleted(); |
1922 return; | 1922 return; |
1923 } | 1923 } |
1924 | 1924 |
1925 // When this is called, the PrefService is initialized and provides access | 1925 // When this is called, the PrefService is initialized and provides access |
1926 // to the user preferences stored in a JSON file. | 1926 // to the user preferences stored in a JSON file. |
1927 ExtensionIdSet extension_ids; | 1927 ExtensionIds extension_ids; |
1928 GetExtensions(&extension_ids); | 1928 GetExtensions(&extension_ids); |
1929 // Create empty preferences dictionary for each extension (these dictionaries | 1929 // Create empty preferences dictionary for each extension (these dictionaries |
1930 // are pruned when persisting the preferences to disk). | 1930 // are pruned when persisting the preferences to disk). |
1931 for (ExtensionIdSet::iterator ext_id = extension_ids.begin(); | 1931 for (ExtensionIds::iterator ext_id = extension_ids.begin(); |
1932 ext_id != extension_ids.end(); ++ext_id) { | 1932 ext_id != extension_ids.end(); ++ext_id) { |
1933 ScopedExtensionPrefUpdate update(prefs_, *ext_id); | 1933 ScopedExtensionPrefUpdate update(prefs_, *ext_id); |
1934 // This creates an empty dictionary if none is stored. | 1934 // This creates an empty dictionary if none is stored. |
1935 update.Get(); | 1935 update.Get(); |
1936 } | 1936 } |
1937 | 1937 |
1938 FixMissingPrefs(extension_ids); | 1938 FixMissingPrefs(extension_ids); |
1939 MigratePermissions(extension_ids); | 1939 MigratePermissions(extension_ids); |
1940 MigrateDisableReasons(extension_ids); | 1940 MigrateDisableReasons(extension_ids); |
1941 extension_sorting_->Initialize(extension_ids); | 1941 extension_sorting_->Initialize(extension_ids); |
1942 | 1942 |
1943 // Store extension controlled preference values in the | 1943 // Store extension controlled preference values in the |
1944 // |extension_pref_value_map_|, which then informs the subscribers | 1944 // |extension_pref_value_map_|, which then informs the subscribers |
1945 // (ExtensionPrefStores) about the winning values. | 1945 // (ExtensionPrefStores) about the winning values. |
1946 for (ExtensionIdSet::iterator ext_id = extension_ids.begin(); | 1946 for (ExtensionIds::iterator ext_id = extension_ids.begin(); |
1947 ext_id != extension_ids.end(); ++ext_id) { | 1947 ext_id != extension_ids.end(); ++ext_id) { |
1948 extension_pref_value_map_->RegisterExtension( | 1948 extension_pref_value_map_->RegisterExtension( |
1949 *ext_id, | 1949 *ext_id, |
1950 GetInstallTime(*ext_id), | 1950 GetInstallTime(*ext_id), |
1951 !IsExtensionDisabled(*ext_id)); | 1951 !IsExtensionDisabled(*ext_id)); |
1952 content_settings_store_->RegisterExtension( | 1952 content_settings_store_->RegisterExtension( |
1953 *ext_id, | 1953 *ext_id, |
1954 GetInstallTime(*ext_id), | 1954 GetInstallTime(*ext_id), |
1955 !IsExtensionDisabled(*ext_id)); | 1955 !IsExtensionDisabled(*ext_id)); |
1956 | 1956 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2058 | 2058 |
2059 bool ExtensionPrefs::HasIncognitoPrefValue(const std::string& pref_key) { | 2059 bool ExtensionPrefs::HasIncognitoPrefValue(const std::string& pref_key) { |
2060 bool has_incognito_pref_value = false; | 2060 bool has_incognito_pref_value = false; |
2061 extension_pref_value_map_->GetEffectivePrefValue(pref_key, | 2061 extension_pref_value_map_->GetEffectivePrefValue(pref_key, |
2062 true, | 2062 true, |
2063 &has_incognito_pref_value); | 2063 &has_incognito_pref_value); |
2064 return has_incognito_pref_value; | 2064 return has_incognito_pref_value; |
2065 } | 2065 } |
2066 | 2066 |
2067 void ExtensionPrefs::ClearIncognitoSessionOnlyContentSettings() { | 2067 void ExtensionPrefs::ClearIncognitoSessionOnlyContentSettings() { |
2068 ExtensionIdSet extension_ids; | 2068 ExtensionIds extension_ids; |
2069 GetExtensions(&extension_ids); | 2069 GetExtensions(&extension_ids); |
2070 for (ExtensionIdSet::iterator ext_id = extension_ids.begin(); | 2070 for (ExtensionIds::iterator ext_id = extension_ids.begin(); |
2071 ext_id != extension_ids.end(); ++ext_id) { | 2071 ext_id != extension_ids.end(); ++ext_id) { |
2072 content_settings_store_->ClearContentSettingsForExtension( | 2072 content_settings_store_->ClearContentSettingsForExtension( |
2073 *ext_id, | 2073 *ext_id, |
2074 kExtensionPrefsScopeIncognitoSessionOnly); | 2074 kExtensionPrefsScopeIncognitoSessionOnly); |
2075 } | 2075 } |
2076 } | 2076 } |
2077 | 2077 |
2078 URLPatternSet ExtensionPrefs::GetAllowedInstallSites() { | 2078 URLPatternSet ExtensionPrefs::GetAllowedInstallSites() { |
2079 URLPatternSet result; | 2079 URLPatternSet result; |
2080 const ListValue* list = prefs_->GetList(prefs::kExtensionAllowedInstallSites); | 2080 const ListValue* list = prefs_->GetList(prefs::kExtensionAllowedInstallSites); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2122 prefs->RegisterInt64Pref(prefs::kLastExtensionsUpdateCheck, | 2122 prefs->RegisterInt64Pref(prefs::kLastExtensionsUpdateCheck, |
2123 0, // default value | 2123 0, // default value |
2124 PrefService::UNSYNCABLE_PREF); | 2124 PrefService::UNSYNCABLE_PREF); |
2125 prefs->RegisterInt64Pref(prefs::kNextExtensionsUpdateCheck, | 2125 prefs->RegisterInt64Pref(prefs::kNextExtensionsUpdateCheck, |
2126 0, // default value | 2126 0, // default value |
2127 PrefService::UNSYNCABLE_PREF); | 2127 PrefService::UNSYNCABLE_PREF); |
2128 prefs->RegisterListPref(prefs::kExtensionAllowedInstallSites, | 2128 prefs->RegisterListPref(prefs::kExtensionAllowedInstallSites, |
2129 PrefService::UNSYNCABLE_PREF); | 2129 PrefService::UNSYNCABLE_PREF); |
2130 } | 2130 } |
2131 | 2131 |
2132 ExtensionPrefs::ExtensionIdSet ExtensionPrefs::GetExtensionPrefAsVector( | 2132 ExtensionPrefs::ExtensionIds ExtensionPrefs::GetExtensionPrefAsVector( |
2133 const char* pref) { | 2133 const char* pref) { |
2134 ExtensionIdSet extension_ids; | 2134 ExtensionIds extension_ids; |
2135 const ListValue* list_of_values = prefs_->GetList(pref); | 2135 const ListValue* list_of_values = prefs_->GetList(pref); |
2136 if (!list_of_values) | 2136 if (!list_of_values) |
2137 return extension_ids; | 2137 return extension_ids; |
2138 | 2138 |
2139 std::string extension_id; | 2139 std::string extension_id; |
2140 for (size_t i = 0; i < list_of_values->GetSize(); ++i) { | 2140 for (size_t i = 0; i < list_of_values->GetSize(); ++i) { |
2141 if (list_of_values->GetString(i, &extension_id)) | 2141 if (list_of_values->GetString(i, &extension_id)) |
2142 extension_ids.push_back(extension_id); | 2142 extension_ids.push_back(extension_id); |
2143 } | 2143 } |
2144 return extension_ids; | 2144 return extension_ids; |
2145 } | 2145 } |
2146 | 2146 |
2147 void ExtensionPrefs::SetExtensionPrefFromVector(const char* pref, | 2147 void ExtensionPrefs::SetExtensionPrefFromVector(const char* pref, |
2148 const ExtensionIdSet& strings) { | 2148 const ExtensionIds& strings) { |
2149 ListPrefUpdate update(prefs_, pref); | 2149 ListPrefUpdate update(prefs_, pref); |
2150 ListValue* list_of_values = update.Get(); | 2150 ListValue* list_of_values = update.Get(); |
2151 list_of_values->Clear(); | 2151 list_of_values->Clear(); |
2152 for (ExtensionIdSet::const_iterator iter = strings.begin(); | 2152 for (ExtensionIds::const_iterator iter = strings.begin(); |
2153 iter != strings.end(); ++iter) | 2153 iter != strings.end(); ++iter) |
2154 list_of_values->Append(new StringValue(*iter)); | 2154 list_of_values->Append(new StringValue(*iter)); |
2155 } | 2155 } |
2156 | 2156 |
2157 } // namespace extensions | 2157 } // namespace extensions |
OLD | NEW |