| 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 "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "chrome/grit/generated_resources.h" |
| 9 #include "extensions/common/extensions_client.h" | 10 #include "extensions/common/extensions_client.h" |
| 10 #include "extensions/common/permissions/permission_message.h" | 11 #include "extensions/common/permissions/permission_message.h" |
| 11 #include "extensions/common/permissions/permission_message_util.h" | 12 #include "extensions/common/permissions/permission_message_util.h" |
| 12 #include "extensions/common/permissions/permission_set.h" | 13 #include "extensions/common/permissions/permission_set.h" |
| 13 #include "extensions/common/url_pattern.h" | 14 #include "extensions/common/url_pattern.h" |
| 14 #include "extensions/common/url_pattern_set.h" | 15 #include "extensions/common/url_pattern_set.h" |
| 15 #include "grit/generated_resources.h" | |
| 16 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
| 17 #include "url/gurl.h" | 17 #include "url/gurl.h" |
| 18 | 18 |
| 19 namespace extensions { | 19 namespace extensions { |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 typedef std::set<PermissionMessage> PermissionMsgSet; | 23 typedef std::set<PermissionMessage> PermissionMsgSet; |
| 24 | 24 |
| 25 template<typename T> | 25 template<typename T> |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 std::set<std::string> old_hosts_set( | 449 std::set<std::string> old_hosts_set( |
| 450 permission_message_util::GetDistinctHosts(old_list, false, false)); | 450 permission_message_util::GetDistinctHosts(old_list, false, false)); |
| 451 std::set<std::string> new_hosts_only = | 451 std::set<std::string> new_hosts_only = |
| 452 base::STLSetDifference<std::set<std::string> >(new_hosts_set, | 452 base::STLSetDifference<std::set<std::string> >(new_hosts_set, |
| 453 old_hosts_set); | 453 old_hosts_set); |
| 454 | 454 |
| 455 return !new_hosts_only.empty(); | 455 return !new_hosts_only.empty(); |
| 456 } | 456 } |
| 457 | 457 |
| 458 } // namespace extensions | 458 } // namespace extensions |
| OLD | NEW |