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

Unified Diff: components/resource_provider/resource_provider_apptest.cc

Issue 1132083003: Makes ResourceLoader own handles and return Files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 5 years, 7 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
« no previous file with comments | « components/resource_provider/public/cpp/resource_loader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/resource_provider/resource_provider_apptest.cc
diff --git a/components/resource_provider/resource_provider_apptest.cc b/components/resource_provider/resource_provider_apptest.cc
index a4e57e2e2f4f3dd53a88b463deb87f7a5bf11613..7853e328b67632c7db6c11398e3ef35df15f1c33 100644
--- a/components/resource_provider/resource_provider_apptest.cc
+++ b/components/resource_provider/resource_provider_apptest.cc
@@ -58,14 +58,12 @@ class ResourceProviderApplicationTest : public mojo::test::ApplicationTestBase {
ResourceContentsMap GetResources(const std::set<std::string>& paths) {
ResourceLoader loader(application_impl()->shell(), paths);
loader.BlockUntilLoaded();
- const ResourceLoader::ResourceMap& resource_loader_results(
- loader.resource_map());
// Load the contents of each of the handles.
ResourceContentsMap results;
- for (auto& pair : resource_loader_results) {
- base::File file(pair.second);
- results[pair.first] = ReadFile(&file);
+ for (auto& path : paths) {
+ base::File file(loader.ReleaseFile(path));
+ results[path] = ReadFile(&file);
}
return results;
}
« no previous file with comments | « components/resource_provider/public/cpp/resource_loader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698