OLD | NEW |
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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 // a prompt. | 1007 // a prompt. |
1008 skip.insert(Extension::kContextMenusPermission); | 1008 skip.insert(Extension::kContextMenusPermission); |
1009 skip.insert(Extension::kIdlePermission); | 1009 skip.insert(Extension::kIdlePermission); |
1010 skip.insert(Extension::kNotificationPermission); | 1010 skip.insert(Extension::kNotificationPermission); |
1011 skip.insert(Extension::kUnlimitedStoragePermission); | 1011 skip.insert(Extension::kUnlimitedStoragePermission); |
1012 skip.insert(Extension::kContentSettingsPermission); | 1012 skip.insert(Extension::kContentSettingsPermission); |
1013 | 1013 |
1014 // TODO(erikkay) add a string for this permission. | 1014 // TODO(erikkay) add a string for this permission. |
1015 skip.insert(Extension::kBackgroundPermission); | 1015 skip.insert(Extension::kBackgroundPermission); |
1016 | 1016 |
| 1017 // TODO(dcheng): add a string for clipboardRead |
| 1018 skip.insert(Extension::kClipboardReadPermission); |
| 1019 skip.insert(Extension::kClipboardWritePermission); |
| 1020 |
1017 // The cookie permission does nothing unless you have associated host | 1021 // The cookie permission does nothing unless you have associated host |
1018 // permissions. | 1022 // permissions. |
1019 skip.insert(Extension::kCookiePermission); | 1023 skip.insert(Extension::kCookiePermission); |
1020 | 1024 |
1021 // The proxy permission is warned as part of host permission checks. | 1025 // The proxy permission is warned as part of host permission checks. |
1022 skip.insert(Extension::kProxyPermission); | 1026 skip.insert(Extension::kProxyPermission); |
1023 | 1027 |
1024 // This permission requires explicit user action (context menu handler) | 1028 // This permission requires explicit user action (context menu handler) |
1025 // so we won't prompt for it for now. | 1029 // so we won't prompt for it for now. |
1026 skip.insert(Extension::kFileBrowserHandlerPermission); | 1030 skip.insert(Extension::kFileBrowserHandlerPermission); |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 EXPECT_TRUE(Extension::GenerateId("test", &result)); | 1557 EXPECT_TRUE(Extension::GenerateId("test", &result)); |
1554 EXPECT_EQ(result, "jpignaibiiemhngfjkcpokkamffknabf"); | 1558 EXPECT_EQ(result, "jpignaibiiemhngfjkcpokkamffknabf"); |
1555 | 1559 |
1556 EXPECT_TRUE(Extension::GenerateId("_", &result)); | 1560 EXPECT_TRUE(Extension::GenerateId("_", &result)); |
1557 EXPECT_EQ(result, "ncocknphbhhlhkikpnnlmbcnbgdempcd"); | 1561 EXPECT_EQ(result, "ncocknphbhhlhkikpnnlmbcnbgdempcd"); |
1558 | 1562 |
1559 EXPECT_TRUE(Extension::GenerateId( | 1563 EXPECT_TRUE(Extension::GenerateId( |
1560 "this_string_is_longer_than_a_single_sha256_hash_digest", &result)); | 1564 "this_string_is_longer_than_a_single_sha256_hash_digest", &result)); |
1561 EXPECT_EQ(result, "jimneklojkjdibfkgiiophfhjhbdgcfi"); | 1565 EXPECT_EQ(result, "jimneklojkjdibfkgiiophfhjhbdgcfi"); |
1562 } | 1566 } |
OLD | NEW |