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

Unified Diff: chrome/browser/extensions/extension_special_storage_policy_unittest.cc

Issue 612983004: Gather metrics on hosted app unlimitedStorage usage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_special_storage_policy_unittest.cc
diff --git a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
index 06a5d33ae021969f8cdd2a83d246848594e18dbe..09984c26b1c1359bd862e9ea83e2be2114515471 100644
--- a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
+++ b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
@@ -198,7 +198,7 @@ TEST_F(ExtensionSpecialStoragePolicyTest, EmptyPolicy) {
TEST_F(ExtensionSpecialStoragePolicyTest, AppWithProtectedStorage) {
scoped_refptr<Extension> extension(CreateProtectedApp());
- policy_->GrantRightsForExtension(extension.get());
+ policy_->GrantRightsForExtension(extension.get(), NULL);
ExtensionSet protecting_extensions;
protecting_extensions.Insert(extension);
ExtensionSet empty_set;
@@ -219,7 +219,7 @@ TEST_F(ExtensionSpecialStoragePolicyTest, AppWithProtectedStorage) {
TEST_F(ExtensionSpecialStoragePolicyTest, AppWithUnlimitedStorage) {
scoped_refptr<Extension> extension(CreateUnlimitedApp());
- policy_->GrantRightsForExtension(extension.get());
+ policy_->GrantRightsForExtension(extension.get(), NULL);
ExtensionSet protecting_extensions;
protecting_extensions.Insert(extension);
ExtensionSet empty_set;
@@ -253,9 +253,9 @@ TEST_F(ExtensionSpecialStoragePolicyTest, CanQueryDiskSize) {
scoped_refptr<Extension> regular_app(CreateRegularApp());
scoped_refptr<Extension> protected_app(CreateProtectedApp());
scoped_refptr<Extension> unlimited_app(CreateUnlimitedApp());
- policy_->GrantRightsForExtension(regular_app.get());
- policy_->GrantRightsForExtension(protected_app.get());
- policy_->GrantRightsForExtension(unlimited_app.get());
+ policy_->GrantRightsForExtension(regular_app.get(), NULL);
+ policy_->GrantRightsForExtension(protected_app.get(), NULL);
+ policy_->GrantRightsForExtension(unlimited_app.get(), NULL);
EXPECT_FALSE(policy_->CanQueryDiskSize(kHttpUrl));
EXPECT_FALSE(policy_->CanQueryDiskSize(kExtensionUrl));
@@ -268,7 +268,7 @@ TEST_F(ExtensionSpecialStoragePolicyTest, HasIsolatedStorage) {
const GURL kHttpUrl("http://foo");
const GURL kExtensionUrl("chrome-extension://bar");
scoped_refptr<Extension> app(CreateRegularApp());
- policy_->GrantRightsForExtension(app.get());
+ policy_->GrantRightsForExtension(app.get(), NULL);
EXPECT_FALSE(policy_->HasIsolatedStorage(kHttpUrl));
EXPECT_FALSE(policy_->HasIsolatedStorage(kExtensionUrl));
@@ -278,8 +278,8 @@ TEST_F(ExtensionSpecialStoragePolicyTest, HasIsolatedStorage) {
TEST_F(ExtensionSpecialStoragePolicyTest, OverlappingApps) {
scoped_refptr<Extension> protected_app(CreateProtectedApp());
scoped_refptr<Extension> unlimited_app(CreateUnlimitedApp());
- policy_->GrantRightsForExtension(protected_app.get());
- policy_->GrantRightsForExtension(unlimited_app.get());
+ policy_->GrantRightsForExtension(protected_app.get(), NULL);
+ policy_->GrantRightsForExtension(unlimited_app.get(), NULL);
ExtensionSet protecting_extensions;
ExtensionSet empty_set;
protecting_extensions.Insert(protected_app);
@@ -371,14 +371,14 @@ TEST_F(ExtensionSpecialStoragePolicyTest, NotificationTest) {
for (size_t i = 0; i < arraysize(apps); ++i) {
SCOPED_TRACE(testing::Message() << "i: " << i);
observer.ExpectGrant(apps[i]->id(), change_flags[i]);
- policy_->GrantRightsForExtension(apps[i].get());
+ policy_->GrantRightsForExtension(apps[i].get(), NULL);
message_loop.RunUntilIdle();
EXPECT_TRUE(observer.IsCompleted());
}
for (size_t i = 0; i < arraysize(apps); ++i) {
SCOPED_TRACE(testing::Message() << "i: " << i);
- policy_->GrantRightsForExtension(apps[i].get());
+ policy_->GrantRightsForExtension(apps[i].get(), NULL);
message_loop.RunUntilIdle();
EXPECT_TRUE(observer.IsCompleted());
}

Powered by Google App Engine
This is Rietveld 408576698