| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 kInputMethodPrivate, "inputMethodPrivate", 0, | 305 kInputMethodPrivate, "inputMethodPrivate", 0, |
| 306 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional); | 306 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional); |
| 307 info->RegisterPermission( | 307 info->RegisterPermission( |
| 308 kOffersPrivate, "offersPrivate", 0, ExtensionPermissionMessage::kNone, | 308 kEchoPrivate, "echoPrivate", 0, ExtensionPermissionMessage::kNone, |
| 309 kFlagCannotBeOptional); | 309 kFlagCannotBeOptional); |
| 310 info->RegisterPermission( | 310 info->RegisterPermission( |
| 311 kTerminalPrivate, "terminalPrivate", 0, ExtensionPermissionMessage::kNone, | 311 kTerminalPrivate, "terminalPrivate", 0, ExtensionPermissionMessage::kNone, |
| 312 kFlagCannotBeOptional); | 312 kFlagCannotBeOptional); |
| 313 info->RegisterPermission( | 313 info->RegisterPermission( |
| 314 kWebSocketProxyPrivate, "webSocketProxyPrivate", 0, | 314 kWebSocketProxyPrivate, "webSocketProxyPrivate", 0, |
| 315 ExtensionPermissionMessage::kNone, | 315 ExtensionPermissionMessage::kNone, |
| 316 kFlagCannotBeOptional); | 316 kFlagCannotBeOptional); |
| 317 info->RegisterPermission( | 317 info->RegisterPermission( |
| 318 kWebstorePrivate, "webstorePrivate", 0, | 318 kWebstorePrivate, "webstorePrivate", 0, |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 883 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); |
| 884 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); | 884 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
| 885 std::set<std::string> new_hosts_only; | 885 std::set<std::string> new_hosts_only; |
| 886 | 886 |
| 887 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 887 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
| 888 old_hosts_set.begin(), old_hosts_set.end(), | 888 old_hosts_set.begin(), old_hosts_set.end(), |
| 889 std::inserter(new_hosts_only, new_hosts_only.begin())); | 889 std::inserter(new_hosts_only, new_hosts_only.begin())); |
| 890 | 890 |
| 891 return !new_hosts_only.empty(); | 891 return !new_hosts_only.empty(); |
| 892 } | 892 } |
| OLD | NEW |