OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extension_permission_set.h" | 5 #include "chrome/common/extensions/extension_permission_set.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 ExtensionAPIPermission::kFileBrowserHandler, "fileBrowserHandler", 0, | 289 ExtensionAPIPermission::kFileBrowserHandler, "fileBrowserHandler", 0, |
290 ExtensionPermissionMessage::kNone, none); | 290 ExtensionPermissionMessage::kNone, none); |
291 RegisterPermission( | 291 RegisterPermission( |
292 ExtensionAPIPermission::kHistory, "history", | 292 ExtensionAPIPermission::kHistory, "history", |
293 IDS_EXTENSION_PROMPT_WARNING_BROWSING_HISTORY, | 293 IDS_EXTENSION_PROMPT_WARNING_BROWSING_HISTORY, |
294 ExtensionPermissionMessage::kBrowsingHistory, optional); | 294 ExtensionPermissionMessage::kBrowsingHistory, optional); |
295 RegisterPermission( | 295 RegisterPermission( |
296 ExtensionAPIPermission::kIdle, "idle", 0, | 296 ExtensionAPIPermission::kIdle, "idle", 0, |
297 ExtensionPermissionMessage::kNone, optional); | 297 ExtensionPermissionMessage::kNone, optional); |
298 RegisterPermission( | 298 RegisterPermission( |
| 299 ExtensionAPIPermission::kIme, "ime", |
| 300 IDS_EXTENSION_PROMPT_WARNING_IME, |
| 301 ExtensionPermissionMessage::kIme, none); |
| 302 RegisterPermission( |
299 ExtensionAPIPermission::kInputMethodPrivate, "inputMethodPrivate", 0, | 303 ExtensionAPIPermission::kInputMethodPrivate, "inputMethodPrivate", 0, |
300 ExtensionPermissionMessage::kNone, none); | 304 ExtensionPermissionMessage::kNone, none); |
301 RegisterPermission( | 305 RegisterPermission( |
302 ExtensionAPIPermission::kManagement, "management", | 306 ExtensionAPIPermission::kManagement, "management", |
303 IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, | 307 IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, |
304 ExtensionPermissionMessage::kManagement, optional); | 308 ExtensionPermissionMessage::kManagement, optional); |
305 RegisterPermission( | 309 RegisterPermission( |
306 ExtensionAPIPermission::kPageCapture, "pageCapture", | 310 ExtensionAPIPermission::kPageCapture, "pageCapture", |
307 IDS_EXTENSION_PROMPT_WARNING_ALL_PAGES_CONTENT, | 311 IDS_EXTENSION_PROMPT_WARNING_ALL_PAGES_CONTENT, |
308 ExtensionPermissionMessage::kAllPageContent, none); | 312 ExtensionPermissionMessage::kAllPageContent, none); |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 863 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); |
860 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); | 864 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
861 std::set<std::string> new_hosts_only; | 865 std::set<std::string> new_hosts_only; |
862 | 866 |
863 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 867 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
864 old_hosts_set.begin(), old_hosts_set.end(), | 868 old_hosts_set.begin(), old_hosts_set.end(), |
865 std::inserter(new_hosts_only, new_hosts_only.begin())); | 869 std::inserter(new_hosts_only, new_hosts_only.begin())); |
866 | 870 |
867 return !new_hosts_only.empty(); | 871 return !new_hosts_only.empty(); |
868 } | 872 } |
OLD | NEW |