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

Side by Side Diff: chrome/common/extensions/permissions/permission_set_unittest.cc

Issue 12300041: Add nativeMessaging extension permission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/json/json_file_value_serializer.h" 6 #include "base/json/json_file_value_serializer.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/common/chrome_paths.h" 10 #include "chrome/common/chrome_paths.h"
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 skip.insert(APIPermission::kBackground); 681 skip.insert(APIPermission::kBackground);
682 682
683 skip.insert(APIPermission::kClipboardWrite); 683 skip.insert(APIPermission::kClipboardWrite);
684 684
685 // The cookie permission does nothing unless you have associated host 685 // The cookie permission does nothing unless you have associated host
686 // permissions. 686 // permissions.
687 skip.insert(APIPermission::kCookie); 687 skip.insert(APIPermission::kCookie);
688 688
689 // These are warned as part of host permission checks. 689 // These are warned as part of host permission checks.
690 skip.insert(APIPermission::kDeclarativeContent); 690 skip.insert(APIPermission::kDeclarativeContent);
691 skip.insert(APIPermission::kDeclarativeWebRequest);
692 skip.insert(APIPermission::kNativeMessaging);
691 skip.insert(APIPermission::kPageCapture); 693 skip.insert(APIPermission::kPageCapture);
692 skip.insert(APIPermission::kProxy); 694 skip.insert(APIPermission::kProxy);
695 skip.insert(APIPermission::kTabCapture);
693 skip.insert(APIPermission::kWebRequest); 696 skip.insert(APIPermission::kWebRequest);
694 skip.insert(APIPermission::kWebRequestBlocking); 697 skip.insert(APIPermission::kWebRequestBlocking);
695 skip.insert(APIPermission::kDeclarativeWebRequest);
696 skip.insert(APIPermission::kTabCapture);
697 698
698 // This permission requires explicit user action (context menu handler) 699 // This permission requires explicit user action (context menu handler)
699 // so we won't prompt for it for now. 700 // so we won't prompt for it for now.
700 skip.insert(APIPermission::kFileBrowserHandler); 701 skip.insert(APIPermission::kFileBrowserHandler);
701 702
702 // These permissions require explicit user action (configuration dialog) 703 // These permissions require explicit user action (configuration dialog)
703 // so we don't prompt for them at install time. 704 // so we don't prompt for them at install time.
704 skip.insert(APIPermission::kMediaGalleries); 705 skip.insert(APIPermission::kMediaGalleries);
705 706
706 // If you've turned on the experimental command-line flag, we don't need 707 // If you've turned on the experimental command-line flag, we don't need
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 apis.insert(APIPermission::kWebRequest); 1366 apis.insert(APIPermission::kWebRequest);
1366 apis.insert(APIPermission::kFileBrowserHandler); 1367 apis.insert(APIPermission::kFileBrowserHandler);
1367 EXPECT_EQ(2U, apis.size()); 1368 EXPECT_EQ(2U, apis.size());
1368 1369
1369 scoped_refptr<PermissionSet> perm_set; 1370 scoped_refptr<PermissionSet> perm_set;
1370 perm_set = new PermissionSet(apis, empty_extent, empty_extent); 1371 perm_set = new PermissionSet(apis, empty_extent, empty_extent);
1371 EXPECT_EQ(4U, perm_set->apis().size()); 1372 EXPECT_EQ(4U, perm_set->apis().size());
1372 } 1373 }
1373 1374
1374 } // namespace extensions 1375 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/permissions/permission_message.h ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698