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

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

Issue 7253001: Added a private chromeAuthPrivate API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unittest failure Created 9 years, 6 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) 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 ExtensionPermissionMessage::kGeolocation); 242 ExtensionPermissionMessage::kGeolocation);
243 RegisterHostedAppPermission( 243 RegisterHostedAppPermission(
244 ExtensionAPIPermission::kNotification, "notifications", 0, 244 ExtensionAPIPermission::kNotification, "notifications", 0,
245 ExtensionPermissionMessage::kNone); 245 ExtensionPermissionMessage::kNone);
246 RegisterHostedAppPermission( 246 RegisterHostedAppPermission(
247 ExtensionAPIPermission::kUnlimitedStorage, "unlimitedStorage", 0, 247 ExtensionAPIPermission::kUnlimitedStorage, "unlimitedStorage", 0,
248 ExtensionPermissionMessage::kNone); 248 ExtensionPermissionMessage::kNone);
249 249
250 // Hosted app and private permissions. 250 // Hosted app and private permissions.
251 RegisterPermission( 251 RegisterPermission(
252 ExtensionAPIPermission::kChromeAuthPrivate, "chromeAuthPrivate", 0,
253 ExtensionPermissionMessage::kNone,
254 true, true, false, false);
255 RegisterPermission(
252 ExtensionAPIPermission::kWebstorePrivate, "webstorePrivate", 0, 256 ExtensionAPIPermission::kWebstorePrivate, "webstorePrivate", 0,
253 ExtensionPermissionMessage::kNone, 257 ExtensionPermissionMessage::kNone,
254 true, true, false, false); 258 true, true, false, false);
255 259
256 // Extension permissions. 260 // Extension permissions.
257 RegisterExtensionPermission( 261 RegisterExtensionPermission(
258 ExtensionAPIPermission::kBookmark, "bookmarks", 262 ExtensionAPIPermission::kBookmark, "bookmarks",
259 IDS_EXTENSION_PROMPT_WARNING_BOOKMARKS, 263 IDS_EXTENSION_PROMPT_WARNING_BOOKMARKS,
260 ExtensionPermissionMessage::kBookmarks); 264 ExtensionPermissionMessage::kBookmarks);
261 RegisterExtensionPermission( 265 RegisterExtensionPermission(
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 std::set<std::string> old_hosts_set(old_hosts.begin(), old_hosts.end()); 773 std::set<std::string> old_hosts_set(old_hosts.begin(), old_hosts.end());
770 std::set<std::string> new_hosts_set(new_hosts.begin(), new_hosts.end()); 774 std::set<std::string> new_hosts_set(new_hosts.begin(), new_hosts.end());
771 std::set<std::string> new_hosts_only; 775 std::set<std::string> new_hosts_only;
772 776
773 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), 777 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(),
774 old_hosts_set.begin(), old_hosts_set.end(), 778 old_hosts_set.begin(), old_hosts_set.end(),
775 std::inserter(new_hosts_only, new_hosts_only.begin())); 779 std::inserter(new_hosts_only, new_hosts_only.begin()));
776 780
777 return !new_hosts_only.empty(); 781 return !new_hosts_only.empty();
778 } 782 }
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