OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/permission_set.h" | 5 #include "chrome/common/extensions/permissions/permission_set.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 const char* kNonPermissionModuleNames[] = { | 42 const char* kNonPermissionModuleNames[] = { |
43 "browserAction", | 43 "browserAction", |
44 "commands", | 44 "commands", |
45 "devtools", | 45 "devtools", |
46 "events", | 46 "events", |
47 "extension", | 47 "extension", |
48 "i18n", | 48 "i18n", |
49 "omnibox", | 49 "omnibox", |
50 "pageAction", | 50 "pageAction", |
51 "pageActions", | 51 "pageActions", |
52 "pageLauncher", | |
53 "permissions", | 52 "permissions", |
54 "runtime", | 53 "runtime", |
55 "scriptBadge", | 54 "scriptBadge", |
56 "tabs", | 55 "tabs", |
57 "test", | 56 "test", |
58 "types", | 57 "types", |
59 "windows" | 58 "windows" |
60 }; | 59 }; |
61 const size_t kNumNonPermissionModuleNames = | 60 const size_t kNumNonPermissionModuleNames = |
62 arraysize(kNonPermissionModuleNames); | 61 arraysize(kNonPermissionModuleNames); |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 std::set<std::string> new_hosts_only; | 645 std::set<std::string> new_hosts_only; |
647 | 646 |
648 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 647 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
649 old_hosts_set.begin(), old_hosts_set.end(), | 648 old_hosts_set.begin(), old_hosts_set.end(), |
650 std::inserter(new_hosts_only, new_hosts_only.begin())); | 649 std::inserter(new_hosts_only, new_hosts_only.begin())); |
651 | 650 |
652 return !new_hosts_only.empty(); | 651 return !new_hosts_only.empty(); |
653 } | 652 } |
654 | 653 |
655 } // namespace extensions | 654 } // namespace extensions |
OLD | NEW |