expected_change_flags_(0) {
}
- virtual void OnGranted(const GURL& origin,
- int change_flags) OVERRIDE {
+ void OnGranted(const GURL& origin, int change_flags) override {
EXPECT_EQ(expected_type_, NOTIFICATION_TYPE_GRANT);
EXPECT_EQ(expected_origin_, origin);
EXPECT_EQ(expected_change_flags_, change_flags);
expected_type_ = NOTIFICATION_TYPE_NONE;
}
- virtual void OnRevoked(const GURL& origin,
- int change_flags) OVERRIDE {
+ void OnRevoked(const GURL& origin, int change_flags) override {
EXPECT_EQ(expected_type_, NOTIFICATION_TYPE_REVOKE);
EXPECT_EQ(expected_origin_, origin);
EXPECT_EQ(expected_change_flags_, change_flags);
expected_type_ = NOTIFICATION_TYPE_NONE;
}
- virtual void OnCleared() OVERRIDE {
+ void OnCleared() override {
EXPECT_EQ(expected_type_, NOTIFICATION_TYPE_CLEAR);
expected_type_ = NOTIFICATION_TYPE_NONE;
}
DISALLOW_COPY_AND_ASSIGN(PolicyChangeObserver);
};
- virtual void SetUp() OVERRIDE {
- policy_ = new ExtensionSpecialStoragePolicy(NULL);
- }
+ void SetUp() override { policy_ = new ExtensionSpecialStoragePolicy(NULL); }
scoped_refptr<Extension> CreateProtectedApp() {
#if defined(OS_WIN)
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;
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;
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));
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));
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);
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());
}