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

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

Issue 8548013: Moving experimental.metrics API to metricsPrivate (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebase 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 // Private permissions 326 // Private permissions
327 RegisterPermission( 327 RegisterPermission(
328 ExtensionAPIPermission::kChromeosInfoPrivate, "chromeosInfoPrivate", 0, 328 ExtensionAPIPermission::kChromeosInfoPrivate, "chromeosInfoPrivate", 0,
329 ExtensionPermissionMessage::kNone, component_only); 329 ExtensionPermissionMessage::kNone, component_only);
330 RegisterPermission( 330 RegisterPermission(
331 ExtensionAPIPermission::kFileBrowserPrivate, "fileBrowserPrivate", 0, 331 ExtensionAPIPermission::kFileBrowserPrivate, "fileBrowserPrivate", 0,
332 ExtensionPermissionMessage::kNone, component_only); 332 ExtensionPermissionMessage::kNone, component_only);
333 RegisterPermission( 333 RegisterPermission(
334 ExtensionAPIPermission::kMediaPlayerPrivate, "mediaPlayerPrivate", 0, 334 ExtensionAPIPermission::kMediaPlayerPrivate, "mediaPlayerPrivate", 0,
335 ExtensionPermissionMessage::kNone, component_only); 335 ExtensionPermissionMessage::kNone, component_only);
336 RegisterPermission(
337 ExtensionAPIPermission::kMetricsPrivate, "metricsPrivate", 0,
338 ExtensionPermissionMessage::kNone, component_only);
336 339
337 // Full url access permissions. 340 // Full url access permissions.
338 RegisterPermission( 341 RegisterPermission(
339 ExtensionAPIPermission::kProxy, "proxy", 0, 342 ExtensionAPIPermission::kProxy, "proxy", 0,
340 ExtensionPermissionMessage::kNone, all_urls); 343 ExtensionPermissionMessage::kNone, all_urls);
341 344
342 RegisterPermission( 345 RegisterPermission(
343 ExtensionAPIPermission::kDevtools, "devtools", 0, 346 ExtensionAPIPermission::kDevtools, "devtools", 0,
344 ExtensionPermissionMessage::kNone, all_urls); 347 ExtensionPermissionMessage::kNone, all_urls);
345 348
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); 838 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false));
836 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); 839 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false));
837 std::set<std::string> new_hosts_only; 840 std::set<std::string> new_hosts_only;
838 841
839 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), 842 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(),
840 old_hosts_set.begin(), old_hosts_set.end(), 843 old_hosts_set.begin(), old_hosts_set.end(),
841 std::inserter(new_hosts_only, new_hosts_only.begin())); 844 std::inserter(new_hosts_only, new_hosts_only.begin()));
842 845
843 return !new_hosts_only.empty(); 846 return !new_hosts_only.empty();
844 } 847 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_permission_set.h ('k') | chrome/common/extensions/extension_permission_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698