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

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

Issue 8662008: Implement chrome.systemPrivate.getIncognitoModeAvailability extension API function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made destructor virtual Created 9 years 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) 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 ExtensionPermissionMessage::kNone, component_only); 333 ExtensionPermissionMessage::kNone, component_only);
334 RegisterPermission( 334 RegisterPermission(
335 ExtensionAPIPermission::kFileBrowserPrivate, "fileBrowserPrivate", 0, 335 ExtensionAPIPermission::kFileBrowserPrivate, "fileBrowserPrivate", 0,
336 ExtensionPermissionMessage::kNone, component_only); 336 ExtensionPermissionMessage::kNone, component_only);
337 RegisterPermission( 337 RegisterPermission(
338 ExtensionAPIPermission::kMediaPlayerPrivate, "mediaPlayerPrivate", 0, 338 ExtensionAPIPermission::kMediaPlayerPrivate, "mediaPlayerPrivate", 0,
339 ExtensionPermissionMessage::kNone, component_only); 339 ExtensionPermissionMessage::kNone, component_only);
340 RegisterPermission( 340 RegisterPermission(
341 ExtensionAPIPermission::kMetricsPrivate, "metricsPrivate", 0, 341 ExtensionAPIPermission::kMetricsPrivate, "metricsPrivate", 0,
342 ExtensionPermissionMessage::kNone, component_only); 342 ExtensionPermissionMessage::kNone, component_only);
343 RegisterPermission(
344 ExtensionAPIPermission::kSystemPrivate, "systemPrivate", 0,
345 ExtensionPermissionMessage::kNone, component_only);
343 346
344 // Full url access permissions. 347 // Full url access permissions.
345 RegisterPermission( 348 RegisterPermission(
346 ExtensionAPIPermission::kProxy, "proxy", 0, 349 ExtensionAPIPermission::kProxy, "proxy", 0,
347 ExtensionPermissionMessage::kNone, all_urls); 350 ExtensionPermissionMessage::kNone, all_urls);
348 351
349 RegisterPermission( 352 RegisterPermission(
350 ExtensionAPIPermission::kDevtools, "devtools", 0, 353 ExtensionAPIPermission::kDevtools, "devtools", 0,
351 ExtensionPermissionMessage::kNone, all_urls); 354 ExtensionPermissionMessage::kNone, all_urls);
352 355
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); 845 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false));
843 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); 846 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false));
844 std::set<std::string> new_hosts_only; 847 std::set<std::string> new_hosts_only;
845 848
846 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), 849 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(),
847 old_hosts_set.begin(), old_hosts_set.end(), 850 old_hosts_set.begin(), old_hosts_set.end(),
848 std::inserter(new_hosts_only, new_hosts_only.begin())); 851 std::inserter(new_hosts_only, new_hosts_only.begin()));
849 852
850 return !new_hosts_only.empty(); 853 return !new_hosts_only.empty();
851 } 854 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698