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

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

Issue 8296017: Revert 105659 - Delay network requests on startup if any webRequest or webNavigation extensions a... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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 "base/json/json_value_serializer.h" 7 #include "base/json/json_value_serializer.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 614
615 // TODO(erikkay) add a string for this permission. 615 // TODO(erikkay) add a string for this permission.
616 skip.insert(ExtensionAPIPermission::kBackground); 616 skip.insert(ExtensionAPIPermission::kBackground);
617 617
618 skip.insert(ExtensionAPIPermission::kClipboardWrite); 618 skip.insert(ExtensionAPIPermission::kClipboardWrite);
619 619
620 // The cookie permission does nothing unless you have associated host 620 // The cookie permission does nothing unless you have associated host
621 // permissions. 621 // permissions.
622 skip.insert(ExtensionAPIPermission::kCookie); 622 skip.insert(ExtensionAPIPermission::kCookie);
623 623
624 // The proxy, webNavigation, and webRequest permissions are warned as part of 624 // The proxy permission is warned as part of host permission checks.
625 // host permission checks.
626 skip.insert(ExtensionAPIPermission::kProxy); 625 skip.insert(ExtensionAPIPermission::kProxy);
627 skip.insert(ExtensionAPIPermission::kWebNavigation);
628 skip.insert(ExtensionAPIPermission::kWebRequest);
629 626
630 // This permission requires explicit user action (context menu handler) 627 // This permission requires explicit user action (context menu handler)
631 // so we won't prompt for it for now. 628 // so we won't prompt for it for now.
632 skip.insert(ExtensionAPIPermission::kFileBrowserHandler); 629 skip.insert(ExtensionAPIPermission::kFileBrowserHandler);
633 630
634 // If you've turned on the experimental command-line flag, we don't need 631 // If you've turned on the experimental command-line flag, we don't need
635 // to warn you further. 632 // to warn you further.
636 skip.insert(ExtensionAPIPermission::kExperimental); 633 skip.insert(ExtensionAPIPermission::kExperimental);
637 634
638 // These are private. 635 // These are private.
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 AddPattern(&non_empty_extent, "http://www.google.com/*"); 1091 AddPattern(&non_empty_extent, "http://www.google.com/*");
1095 1092
1096 perm_set = new ExtensionPermissionSet( 1093 perm_set = new ExtensionPermissionSet(
1097 empty_apis, non_empty_extent, empty_extent); 1094 empty_apis, non_empty_extent, empty_extent);
1098 EXPECT_FALSE(perm_set->IsEmpty()); 1095 EXPECT_FALSE(perm_set->IsEmpty());
1099 1096
1100 perm_set = new ExtensionPermissionSet( 1097 perm_set = new ExtensionPermissionSet(
1101 empty_apis, empty_extent, non_empty_extent); 1098 empty_apis, empty_extent, non_empty_extent);
1102 EXPECT_FALSE(perm_set->IsEmpty()); 1099 EXPECT_FALSE(perm_set->IsEmpty());
1103 } 1100 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698