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

Side by Side Diff: extensions/browser/extension_prefs.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/extension_prefs.h" 5 #include "extensions/browser/extension_prefs.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <iterator> 10 #include <iterator>
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1796 const base::Value* user_pref_value = prefs_->GetUserPrefValue(pref); 1796 const base::Value* user_pref_value = prefs_->GetUserPrefValue(pref);
1797 const base::ListValue* user_pref_as_list; 1797 const base::ListValue* user_pref_as_list;
1798 if (!user_pref_value || !user_pref_value->GetAsList(&user_pref_as_list)) 1798 if (!user_pref_value || !user_pref_value->GetAsList(&user_pref_as_list))
1799 return false; 1799 return false;
1800 1800
1801 std::insert_iterator<ExtensionIdContainer> insert_iterator( 1801 std::insert_iterator<ExtensionIdContainer> insert_iterator(
1802 *id_container_out, id_container_out->end()); 1802 *id_container_out, id_container_out->end());
1803 std::string extension_id; 1803 std::string extension_id;
1804 for (base::ListValue::const_iterator value_it = user_pref_as_list->begin(); 1804 for (base::ListValue::const_iterator value_it = user_pref_as_list->begin();
1805 value_it != user_pref_as_list->end(); ++value_it) { 1805 value_it != user_pref_as_list->end(); ++value_it) {
1806 if (!value_it->GetAsString(&extension_id)) { 1806 if (!(*value_it)->GetAsString(&extension_id)) {
1807 NOTREACHED(); 1807 NOTREACHED();
1808 continue; 1808 continue;
1809 } 1809 }
1810 insert_iterator = extension_id; 1810 insert_iterator = extension_id;
1811 } 1811 }
1812 return true; 1812 return true;
1813 } 1813 }
1814 1814
1815 template <class ExtensionIdContainer> 1815 template <class ExtensionIdContainer>
1816 void ExtensionPrefs::SetExtensionPrefFromContainer( 1816 void ExtensionPrefs::SetExtensionPrefFromContainer(
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 bool is_incognito_enabled = IsIncognitoEnabled(extension_id); 1960 bool is_incognito_enabled = IsIncognitoEnabled(extension_id);
1961 1961
1962 extension_pref_value_map_->RegisterExtension( 1962 extension_pref_value_map_->RegisterExtension(
1963 extension_id, install_time, is_enabled, is_incognito_enabled); 1963 extension_id, install_time, is_enabled, is_incognito_enabled);
1964 1964
1965 for (auto& observer : observer_list_) 1965 for (auto& observer : observer_list_)
1966 observer.OnExtensionRegistered(extension_id, install_time, is_enabled); 1966 observer.OnExtensionRegistered(extension_id, install_time, is_enabled);
1967 } 1967 }
1968 1968
1969 } // namespace extensions 1969 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/system_network/system_network_api_unittest.cc ('k') | extensions/browser/verified_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698