Chromium Code Reviews| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 249 info->RegisterPermission( | 249 info->RegisterPermission( |
| 250 kPrivacy, "privacy", IDS_EXTENSION_PROMPT_WARNING_PRIVACY, | 250 kPrivacy, "privacy", IDS_EXTENSION_PROMPT_WARNING_PRIVACY, |
| 251 ExtensionPermissionMessage::kPrivacy, kFlagNone); | 251 ExtensionPermissionMessage::kPrivacy, kFlagNone); |
| 252 info->RegisterPermission( | 252 info->RegisterPermission( |
| 253 kStorage, "storage", 0, | 253 kStorage, "storage", 0, |
| 254 ExtensionPermissionMessage::kNone, kFlagNone); | 254 ExtensionPermissionMessage::kNone, kFlagNone); |
| 255 info->RegisterPermission( | 255 info->RegisterPermission( |
| 256 kTab, "tabs", IDS_EXTENSION_PROMPT_WARNING_TABS, | 256 kTab, "tabs", IDS_EXTENSION_PROMPT_WARNING_TABS, |
| 257 ExtensionPermissionMessage::kTabs, kFlagNone); | 257 ExtensionPermissionMessage::kTabs, kFlagNone); |
| 258 info->RegisterPermission( | 258 info->RegisterPermission( |
| 259 kTopSites, "topSites", 0, | |
|
Aaron Boodman
2012/03/21 22:05:23
Since this API effectively gives access to the sam
cduvall
2012/03/21 22:18:07
Done.
| |
| 260 ExtensionPermissionMessage::kNone, kFlagNone); | |
| 261 info->RegisterPermission( | |
| 259 kTts, "tts", 0, | 262 kTts, "tts", 0, |
| 260 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional); | 263 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional); |
| 261 info->RegisterPermission( | 264 info->RegisterPermission( |
| 262 kTtsEngine, "ttsEngine", IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE, | 265 kTtsEngine, "ttsEngine", IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE, |
| 263 ExtensionPermissionMessage::kTtsEngine, | 266 ExtensionPermissionMessage::kTtsEngine, |
| 264 kFlagCannotBeOptional); | 267 kFlagCannotBeOptional); |
| 265 info->RegisterPermission( | 268 info->RegisterPermission( |
| 266 kWebNavigation, "webNavigation", | 269 kWebNavigation, "webNavigation", |
| 267 IDS_EXTENSION_PROMPT_WARNING_TABS, ExtensionPermissionMessage::kTabs, | 270 IDS_EXTENSION_PROMPT_WARNING_TABS, ExtensionPermissionMessage::kTabs, |
| 268 kFlagNone); | 271 kFlagNone); |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 874 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 877 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); |
| 875 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); | 878 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
| 876 std::set<std::string> new_hosts_only; | 879 std::set<std::string> new_hosts_only; |
| 877 | 880 |
| 878 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 881 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
| 879 old_hosts_set.begin(), old_hosts_set.end(), | 882 old_hosts_set.begin(), old_hosts_set.end(), |
| 880 std::inserter(new_hosts_only, new_hosts_only.begin())); | 883 std::inserter(new_hosts_only, new_hosts_only.begin())); |
| 881 | 884 |
| 882 return !new_hosts_only.empty(); | 885 return !new_hosts_only.empty(); |
| 883 } | 886 } |
| OLD | NEW |