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 "chrome/browser/extensions/extension_management_internal.h" | 5 #include "chrome/browser/extensions/extension_management_internal.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 APIPermissionSet::Union( | 130 APIPermissionSet::Union( |
131 permissions_to_merge_from, permissions_parsed, &blocked_permissions); | 131 permissions_to_merge_from, permissions_parsed, &blocked_permissions); |
132 } | 132 } |
133 | 133 |
134 // Parses the minimum version settings. | 134 // Parses the minimum version settings. |
135 std::string minimum_version_required_str; | 135 std::string minimum_version_required_str; |
136 if (scope == SCOPE_INDIVIDUAL && | 136 if (scope == SCOPE_INDIVIDUAL && |
137 dict->GetStringWithoutPathExpansion( | 137 dict->GetStringWithoutPathExpansion( |
138 schema_constants::kMinimumVersionRequired, | 138 schema_constants::kMinimumVersionRequired, |
139 &minimum_version_required_str)) { | 139 &minimum_version_required_str)) { |
140 scoped_ptr<base::Version> version( | 140 std::unique_ptr<base::Version> version( |
141 new Version(minimum_version_required_str)); | 141 new Version(minimum_version_required_str)); |
142 // We accept a general version string here. Note that count of components in | 142 // We accept a general version string here. Note that count of components in |
143 // version string of extensions is limited to 4. | 143 // version string of extensions is limited to 4. |
144 if (!version->IsValid()) | 144 if (!version->IsValid()) |
145 LOG(WARNING) << kMalformedPreferenceWarning; | 145 LOG(WARNING) << kMalformedPreferenceWarning; |
146 else | 146 else |
147 minimum_version_required = std::move(version); | 147 minimum_version_required = std::move(version); |
148 } | 148 } |
149 | 149 |
150 return true; | 150 return true; |
(...skipping 15 matching lines...) Expand all Loading... |
166 void GlobalSettings::Reset() { | 166 void GlobalSettings::Reset() { |
167 has_restricted_install_sources = false; | 167 has_restricted_install_sources = false; |
168 install_sources.ClearPatterns(); | 168 install_sources.ClearPatterns(); |
169 has_restricted_allowed_types = false; | 169 has_restricted_allowed_types = false; |
170 allowed_types.clear(); | 170 allowed_types.clear(); |
171 } | 171 } |
172 | 172 |
173 } // namespace internal | 173 } // namespace internal |
174 | 174 |
175 } // namespace extensions | 175 } // namespace extensions |
OLD | NEW |