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

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

Issue 6810037: File API changes needed for safely passing user selected file entities from the file browser comp... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 1016
1017 // The cookie permission does nothing unless you have associated host 1017 // The cookie permission does nothing unless you have associated host
1018 // permissions. 1018 // permissions.
1019 skip.insert(Extension::kCookiePermission); 1019 skip.insert(Extension::kCookiePermission);
1020 1020
1021 // The proxy permission is warned as part of host permission checks. 1021 // The proxy permission is warned as part of host permission checks.
1022 skip.insert(Extension::kProxyPermission); 1022 skip.insert(Extension::kProxyPermission);
1023 1023
1024 // This permission requires explicit user action (context menu handler) 1024 // This permission requires explicit user action (context menu handler)
1025 // so we won't prompt for it for now. 1025 // so we won't prompt for it for now.
1026 skip.insert(Extension::kFileBrowserHandlerPermission);
1027
1028 // This permission requires explicit user action (context menu handler)
1029 // so we won't prompt for it for now.
1026 skip.insert(Extension::kFileSystemPermission); 1030 skip.insert(Extension::kFileSystemPermission);
1027 1031
1028 // If you've turned on the experimental command-line flag, we don't need 1032 // If you've turned on the experimental command-line flag, we don't need
1029 // to warn you further. 1033 // to warn you further.
1030 skip.insert(Extension::kExperimentalPermission); 1034 skip.insert(Extension::kExperimentalPermission);
1031 1035
1032 // These are only usable by component extensions. 1036 // These are only usable by component extensions.
1033 skip.insert(Extension::kWebstorePrivatePermission); 1037 skip.insert(Extension::kWebstorePrivatePermission);
1034 skip.insert(Extension::kFileBrowserPrivatePermission); 1038 skip.insert(Extension::kFileBrowserPrivatePermission);
1035 skip.insert(Extension::kChromeosInfoPrivatePermissions); 1039 skip.insert(Extension::kChromeosInfoPrivatePermissions);
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 EXPECT_TRUE(Extension::GenerateId("test", &result)); 1537 EXPECT_TRUE(Extension::GenerateId("test", &result));
1534 EXPECT_EQ(result, "jpignaibiiemhngfjkcpokkamffknabf"); 1538 EXPECT_EQ(result, "jpignaibiiemhngfjkcpokkamffknabf");
1535 1539
1536 EXPECT_TRUE(Extension::GenerateId("_", &result)); 1540 EXPECT_TRUE(Extension::GenerateId("_", &result));
1537 EXPECT_EQ(result, "ncocknphbhhlhkikpnnlmbcnbgdempcd"); 1541 EXPECT_EQ(result, "ncocknphbhhlhkikpnnlmbcnbgdempcd");
1538 1542
1539 EXPECT_TRUE(Extension::GenerateId( 1543 EXPECT_TRUE(Extension::GenerateId(
1540 "this_string_is_longer_than_a_single_sha256_hash_digest", &result)); 1544 "this_string_is_longer_than_a_single_sha256_hash_digest", &result));
1541 EXPECT_EQ(result, "jimneklojkjdibfkgiiophfhjhbdgcfi"); 1545 EXPECT_EQ(result, "jimneklojkjdibfkgiiophfhjhbdgcfi");
1542 } 1546 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/renderer/extensions/extension_process_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698