| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/common/extensions/permissions/chrome_permission_message_provide
r.h" | 5 #include "chrome/common/extensions/permissions/chrome_permission_message_provide
r.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
| 13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 14 #include "chrome/common/extensions/permissions/chrome_permission_message_rules.h
" | 14 #include "chrome/common/extensions/permissions/chrome_permission_message_rules.h
" |
| 15 #include "chrome/grit/generated_resources.h" | 15 #include "chrome/grit/generated_resources.h" |
| 16 #include "extensions/common/extensions_client.h" | 16 #include "extensions/common/extensions_client.h" |
| 17 #include "extensions/common/permissions/permission_message.h" | |
| 18 #include "extensions/common/permissions/permission_message_util.h" | 17 #include "extensions/common/permissions/permission_message_util.h" |
| 19 #include "extensions/common/permissions/permission_set.h" | 18 #include "extensions/common/permissions/permission_set.h" |
| 20 #include "extensions/common/url_pattern.h" | 19 #include "extensions/common/url_pattern.h" |
| 21 #include "extensions/common/url_pattern_set.h" | 20 #include "extensions/common/url_pattern_set.h" |
| 22 #include "grit/extensions_strings.h" | 21 #include "grit/extensions_strings.h" |
| 23 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
| 24 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 25 | 24 |
| 26 namespace extensions { | 25 namespace extensions { |
| 27 | 26 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 std::set<std::string> old_hosts_set( | 248 std::set<std::string> old_hosts_set( |
| 250 permission_message_util::GetDistinctHosts(old_list, false, false)); | 249 permission_message_util::GetDistinctHosts(old_list, false, false)); |
| 251 std::set<std::string> new_hosts_only = | 250 std::set<std::string> new_hosts_only = |
| 252 base::STLSetDifference<std::set<std::string> >(new_hosts_set, | 251 base::STLSetDifference<std::set<std::string> >(new_hosts_set, |
| 253 old_hosts_set); | 252 old_hosts_set); |
| 254 | 253 |
| 255 return !new_hosts_only.empty(); | 254 return !new_hosts_only.empty(); |
| 256 } | 255 } |
| 257 | 256 |
| 258 } // namespace extensions | 257 } // namespace extensions |
| OLD | NEW |