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

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

Issue 1495403002: Observe adding external extensions via windows registry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing files Created 4 years, 11 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/external_policy_loader_unittest.cc
diff --git a/chrome/browser/extensions/external_policy_loader_unittest.cc b/chrome/browser/extensions/external_policy_loader_unittest.cc
index 8714eaeeb99189822d73e1691f16fdaaf3c74e58..034082320c87ca6d8547238017df4d325d8ddd4a 100644
--- a/chrome/browser/extensions/external_policy_loader_unittest.cc
+++ b/chrome/browser/extensions/external_policy_loader_unittest.cc
@@ -70,35 +70,27 @@ class MockExternalPolicyProviderVisitor
EXPECT_TRUE(expected_extensions_.empty());
}
- bool OnExternalExtensionFileFound(const std::string& id,
- const Version* version,
- const base::FilePath& path,
- Manifest::Location unused,
- int unused2,
- bool unused3,
- bool unused4) override {
+ bool OnExternalExtensionFileFound(
+ extensions::ExternalExtensionInstallInfoFile* info) override {
ADD_FAILURE() << "There should be no external extensions from files.";
return false;
}
- bool OnExternalExtensionUpdateUrlFound(const std::string& id,
- const std::string& install_parameter,
- const GURL& update_url,
- Manifest::Location location,
- int unused1,
- bool unused2) override {
+ bool OnExternalExtensionUpdateUrlFound(
+ extensions::ExternalExtensionInstallInfoUpdateUrl* info,
+ bool is_initial_load) override {
// Extension has the correct location.
- EXPECT_EQ(Manifest::EXTERNAL_POLICY_DOWNLOAD, location);
+ EXPECT_EQ(Manifest::EXTERNAL_POLICY_DOWNLOAD, info->download_location);
// Provider returns the correct location when asked.
Manifest::Location location1;
scoped_ptr<Version> version1;
- provider_->GetExtensionDetails(id, &location1, &version1);
+ provider_->GetExtensionDetails(info->extension_id, &location1, &version1);
EXPECT_EQ(Manifest::EXTERNAL_POLICY_DOWNLOAD, location1);
EXPECT_FALSE(version1.get());
// Remove the extension from our list.
- EXPECT_EQ(1U, expected_extensions_.erase(id));
+ EXPECT_EQ(1U, expected_extensions_.erase(info->extension_id));
return true;
}
@@ -108,6 +100,15 @@ class MockExternalPolicyProviderVisitor
EXPECT_TRUE(provider->IsReady());
}
+ void OnExternalProviderUpdateComplete(
+ const ExternalProviderInterface* provider,
+ const ScopedVector<ExternalExtensionInstallInfoUpdateUrl>&
+ update_url_extensions,
+ const ScopedVector<ExternalExtensionInstallInfoFile>& file_extensions,
+ const std::set<std::string>& removed_extensions) override {
+ ADD_FAILURE() << "Only win registry provider is expected to call this.";
+ }
+
private:
std::set<std::string> expected_extensions_;

Powered by Google App Engine
This is Rietveld 408576698