OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 kFlagCannotBeOptional); | 295 kFlagCannotBeOptional); |
296 info->RegisterPermission( | 296 info->RegisterPermission( |
297 kSystemPrivate, "systemPrivate", 0, | 297 kSystemPrivate, "systemPrivate", 0, |
298 ExtensionPermissionMessage::kNone, | 298 ExtensionPermissionMessage::kNone, |
299 kFlagCannotBeOptional); | 299 kFlagCannotBeOptional); |
300 info->RegisterPermission( | 300 info->RegisterPermission( |
301 kChromeAuthPrivate, "chromeAuthPrivate", 0, | 301 kChromeAuthPrivate, "chromeAuthPrivate", 0, |
302 ExtensionPermissionMessage::kNone, | 302 ExtensionPermissionMessage::kNone, |
303 kFlagCannotBeOptional); | 303 kFlagCannotBeOptional); |
304 info->RegisterPermission( | 304 info->RegisterPermission( |
305 kChromePrivate, "chromePrivate", 0, ExtensionPermissionMessage::kNone, | |
306 kFlagCannotBeOptional); | |
307 info->RegisterPermission( | |
308 kInputMethodPrivate, "inputMethodPrivate", 0, | 305 kInputMethodPrivate, "inputMethodPrivate", 0, |
309 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional); | 306 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional); |
310 info->RegisterPermission( | 307 info->RegisterPermission( |
311 kOffersPrivate, "offersPrivate", 0, ExtensionPermissionMessage::kNone, | 308 kOffersPrivate, "offersPrivate", 0, ExtensionPermissionMessage::kNone, |
312 kFlagCannotBeOptional); | 309 kFlagCannotBeOptional); |
313 info->RegisterPermission( | 310 info->RegisterPermission( |
314 kTerminalPrivate, "terminalPrivate", 0, ExtensionPermissionMessage::kNone, | 311 kTerminalPrivate, "terminalPrivate", 0, ExtensionPermissionMessage::kNone, |
315 kFlagCannotBeOptional); | 312 kFlagCannotBeOptional); |
316 info->RegisterPermission( | 313 info->RegisterPermission( |
317 kWebSocketProxyPrivate, "webSocketProxyPrivate", 0, | 314 kWebSocketProxyPrivate, "webSocketProxyPrivate", 0, |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 879 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); |
883 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); | 880 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
884 std::set<std::string> new_hosts_only; | 881 std::set<std::string> new_hosts_only; |
885 | 882 |
886 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 883 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
887 old_hosts_set.begin(), old_hosts_set.end(), | 884 old_hosts_set.begin(), old_hosts_set.end(), |
888 std::inserter(new_hosts_only, new_hosts_only.begin())); | 885 std::inserter(new_hosts_only, new_hosts_only.begin())); |
889 | 886 |
890 return !new_hosts_only.empty(); | 887 return !new_hosts_only.empty(); |
891 } | 888 } |
OLD | NEW |