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

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

Issue 6480033: Implement experimental.contentSettings.misc.blockThirdPartyCookies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 // strings associated with them. 913 // strings associated with them.
914 914
915 std::set<std::string> skip; 915 std::set<std::string> skip;
916 916
917 // These are considered "nuisance" or "trivial" permissions that don't need 917 // These are considered "nuisance" or "trivial" permissions that don't need
918 // a prompt. 918 // a prompt.
919 skip.insert(Extension::kContextMenusPermission); 919 skip.insert(Extension::kContextMenusPermission);
920 skip.insert(Extension::kIdlePermission); 920 skip.insert(Extension::kIdlePermission);
921 skip.insert(Extension::kNotificationPermission); 921 skip.insert(Extension::kNotificationPermission);
922 skip.insert(Extension::kUnlimitedStoragePermission); 922 skip.insert(Extension::kUnlimitedStoragePermission);
923 skip.insert(Extension::kContentSettingsPermission);
923 924
924 // TODO(erikkay) add a string for this permission. 925 // TODO(erikkay) add a string for this permission.
925 skip.insert(Extension::kBackgroundPermission); 926 skip.insert(Extension::kBackgroundPermission);
926 927
927 // The cookie permission does nothing unless you have associated host 928 // The cookie permission does nothing unless you have associated host
928 // permissions. 929 // permissions.
929 skip.insert(Extension::kCookiePermission); 930 skip.insert(Extension::kCookiePermission);
930 931
931 // The proxy permission is warned as part of host permission checks. 932 // The proxy permission is warned as part of host permission checks.
932 skip.insert(Extension::kProxyPermission); 933 skip.insert(Extension::kProxyPermission);
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 EXPECT_TRUE(Extension::GenerateId("test", &result)); 1277 EXPECT_TRUE(Extension::GenerateId("test", &result));
1277 EXPECT_EQ(result, "jpignaibiiemhngfjkcpokkamffknabf"); 1278 EXPECT_EQ(result, "jpignaibiiemhngfjkcpokkamffknabf");
1278 1279
1279 EXPECT_TRUE(Extension::GenerateId("_", &result)); 1280 EXPECT_TRUE(Extension::GenerateId("_", &result));
1280 EXPECT_EQ(result, "ncocknphbhhlhkikpnnlmbcnbgdempcd"); 1281 EXPECT_EQ(result, "ncocknphbhhlhkikpnnlmbcnbgdempcd");
1281 1282
1282 EXPECT_TRUE(Extension::GenerateId( 1283 EXPECT_TRUE(Extension::GenerateId(
1283 "this_string_is_longer_than_a_single_sha256_hash_digest", &result)); 1284 "this_string_is_longer_than_a_single_sha256_hash_digest", &result));
1284 EXPECT_EQ(result, "jimneklojkjdibfkgiiophfhjhbdgcfi"); 1285 EXPECT_EQ(result, "jimneklojkjdibfkgiiophfhjhbdgcfi");
1285 } 1286 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/renderer/resources/extension_process_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698