| OLD | NEW |
| 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 <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 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 continue; | 1502 continue; |
| 1503 | 1503 |
| 1504 scoped_ptr<ExtensionInfo> info = GetDelayedInstallInfo(extension_id.key()); | 1504 scoped_ptr<ExtensionInfo> info = GetDelayedInstallInfo(extension_id.key()); |
| 1505 if (info) | 1505 if (info) |
| 1506 extensions_info->push_back(linked_ptr<ExtensionInfo>(info.release())); | 1506 extensions_info->push_back(linked_ptr<ExtensionInfo>(info.release())); |
| 1507 } | 1507 } |
| 1508 | 1508 |
| 1509 return extensions_info.Pass(); | 1509 return extensions_info.Pass(); |
| 1510 } | 1510 } |
| 1511 | 1511 |
| 1512 bool ExtensionPrefs::IsExtensionBlocked(const std::string& id) const { |
| 1513 return DoesExtensionHaveState(id, Extension::BLOCKED); |
| 1514 } |
| 1515 |
| 1512 bool ExtensionPrefs::IsEphemeralApp(const std::string& extension_id) const { | 1516 bool ExtensionPrefs::IsEphemeralApp(const std::string& extension_id) const { |
| 1513 if (ReadPrefAsBooleanAndReturn(extension_id, kPrefEphemeralApp)) | 1517 if (ReadPrefAsBooleanAndReturn(extension_id, kPrefEphemeralApp)) |
| 1514 return true; | 1518 return true; |
| 1515 | 1519 |
| 1516 // Ephemerality was previously stored in the creation flags, so we must also | 1520 // Ephemerality was previously stored in the creation flags, so we must also |
| 1517 // check it for backcompatibility. | 1521 // check it for backcompatibility. |
| 1518 return (GetCreationFlags(extension_id) & Extension::IS_EPHEMERAL) != 0; | 1522 return (GetCreationFlags(extension_id) & Extension::IS_EPHEMERAL) != 0; |
| 1519 } | 1523 } |
| 1520 | 1524 |
| 1521 void ExtensionPrefs::OnEphemeralAppPromoted(const std::string& extension_id) { | 1525 void ExtensionPrefs::OnEphemeralAppPromoted(const std::string& extension_id) { |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2101 extension_pref_value_map_->RegisterExtension( | 2105 extension_pref_value_map_->RegisterExtension( |
| 2102 extension_id, install_time, is_enabled, is_incognito_enabled); | 2106 extension_id, install_time, is_enabled, is_incognito_enabled); |
| 2103 | 2107 |
| 2104 FOR_EACH_OBSERVER( | 2108 FOR_EACH_OBSERVER( |
| 2105 ExtensionPrefsObserver, | 2109 ExtensionPrefsObserver, |
| 2106 observer_list_, | 2110 observer_list_, |
| 2107 OnExtensionRegistered(extension_id, install_time, is_enabled)); | 2111 OnExtensionRegistered(extension_id, install_time, is_enabled)); |
| 2108 } | 2112 } |
| 2109 | 2113 |
| 2110 } // namespace extensions | 2114 } // namespace extensions |
| OLD | NEW |