Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: chrome/common/extensions/extension_permission_set.cc

Issue 9244005: Move the `privacy` extension API out of experimental. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: License. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 kInputMethodPrivate, "inputMethodPrivate", 0, 248 kInputMethodPrivate, "inputMethodPrivate", 0,
249 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional, kTypeDefault); 249 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional, kTypeDefault);
250 info->RegisterPermission( 250 info->RegisterPermission(
251 kManagement, "management", IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, 251 kManagement, "management", IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT,
252 ExtensionPermissionMessage::kManagement, kFlagNone, kTypeDefault); 252 ExtensionPermissionMessage::kManagement, kFlagNone, kTypeDefault);
253 info->RegisterPermission( 253 info->RegisterPermission(
254 kPageCapture, "pageCapture", 254 kPageCapture, "pageCapture",
255 IDS_EXTENSION_PROMPT_WARNING_ALL_PAGES_CONTENT, 255 IDS_EXTENSION_PROMPT_WARNING_ALL_PAGES_CONTENT,
256 ExtensionPermissionMessage::kAllPageContent, kFlagNone, kTypeDefault); 256 ExtensionPermissionMessage::kAllPageContent, kFlagNone, kTypeDefault);
257 info->RegisterPermission( 257 info->RegisterPermission(
258 kPrivacy, "privacy", IDS_EXTENSION_PROMPT_WARNING_PRIVACY,
259 ExtensionPermissionMessage::kPrivacy, kFlagNone, kTypeDefault);
260 info->RegisterPermission(
258 kStorage, "storage", 0, 261 kStorage, "storage", 0,
259 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault); 262 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault);
260 info->RegisterPermission( 263 info->RegisterPermission(
261 kTab, "tabs", IDS_EXTENSION_PROMPT_WARNING_TABS, 264 kTab, "tabs", IDS_EXTENSION_PROMPT_WARNING_TABS,
262 ExtensionPermissionMessage::kTabs, kFlagNone, 265 ExtensionPermissionMessage::kTabs, kFlagNone,
263 kTypeDefault - kTypePlatformApp); 266 kTypeDefault - kTypePlatformApp);
264 info->RegisterPermission( 267 info->RegisterPermission(
265 kTerminalPrivate, "terminalPrivate", 0, 268 kTerminalPrivate, "terminalPrivate", 0,
266 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional, kTypeDefault); 269 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional, kTypeDefault);
267 info->RegisterPermission( 270 info->RegisterPermission(
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); 870 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false));
868 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); 871 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false));
869 std::set<std::string> new_hosts_only; 872 std::set<std::string> new_hosts_only;
870 873
871 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), 874 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(),
872 old_hosts_set.begin(), old_hosts_set.end(), 875 old_hosts_set.begin(), old_hosts_set.end(),
873 std::inserter(new_hosts_only, new_hosts_only.begin())); 876 std::inserter(new_hosts_only, new_hosts_only.begin()));
874 877
875 return !new_hosts_only.empty(); 878 return !new_hosts_only.empty();
876 } 879 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698