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 <iterator> | 7 #include <iterator> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/prefs/pref_notifier.h" | 10 #include "base/prefs/pref_notifier.h" |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 | 666 |
667 bool ExtensionPrefs::HasWipeoutBeenAcknowledged( | 667 bool ExtensionPrefs::HasWipeoutBeenAcknowledged( |
668 const std::string& extension_id) { | 668 const std::string& extension_id) { |
669 return ReadPrefAsBooleanAndReturn(extension_id, kPrefWipeoutAcknowledged); | 669 return ReadPrefAsBooleanAndReturn(extension_id, kPrefWipeoutAcknowledged); |
670 } | 670 } |
671 | 671 |
672 void ExtensionPrefs::SetWipeoutAcknowledged( | 672 void ExtensionPrefs::SetWipeoutAcknowledged( |
673 const std::string& extension_id, | 673 const std::string& extension_id, |
674 bool value) { | 674 bool value) { |
675 UpdateExtensionPref(extension_id, kPrefWipeoutAcknowledged, | 675 UpdateExtensionPref(extension_id, kPrefWipeoutAcknowledged, |
676 Value::CreateBooleanValue(value)); | 676 value ? Value::CreateBooleanValue(value) : NULL); |
677 } | 677 } |
678 | 678 |
679 bool ExtensionPrefs::SetAlertSystemFirstRun() { | 679 bool ExtensionPrefs::SetAlertSystemFirstRun() { |
680 if (prefs_->GetBoolean(prefs::kExtensionAlertsInitializedPref)) { | 680 if (prefs_->GetBoolean(prefs::kExtensionAlertsInitializedPref)) { |
681 return true; | 681 return true; |
682 } | 682 } |
683 prefs_->SetBoolean(prefs::kExtensionAlertsInitializedPref, true); | 683 prefs_->SetBoolean(prefs::kExtensionAlertsInitializedPref, true); |
684 return false; | 684 return false; |
685 } | 685 } |
686 | 686 |
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1877 is_enabled = initial_state == Extension::ENABLED; | 1877 is_enabled = initial_state == Extension::ENABLED; |
1878 } | 1878 } |
1879 | 1879 |
1880 extension_pref_value_map_->RegisterExtension(extension_id, install_time, | 1880 extension_pref_value_map_->RegisterExtension(extension_id, install_time, |
1881 is_enabled); | 1881 is_enabled); |
1882 content_settings_store_->RegisterExtension(extension_id, install_time, | 1882 content_settings_store_->RegisterExtension(extension_id, install_time, |
1883 is_enabled); | 1883 is_enabled); |
1884 } | 1884 } |
1885 | 1885 |
1886 } // namespace extensions | 1886 } // namespace extensions |
OLD | NEW |