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

Unified Diff: mojo/shell/test_package_manager.h

Issue 1358533004: Move more of ContentHandler handling into PackageManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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
« no previous file with comments | « mojo/shell/package_manager.h ('k') | mojo/shell/test_package_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/test_package_manager.h
diff --git a/mojo/shell/test_package_manager.h b/mojo/shell/test_package_manager.h
index 55377c0bb801707d8d0472cc4463b5ff82222a0d..905aae96be54b3b702b3818531d95a9c9501cfaa 100644
--- a/mojo/shell/test_package_manager.h
+++ b/mojo/shell/test_package_manager.h
@@ -5,46 +5,34 @@
#ifndef MOJO_SHELL_TEST_PACKAGE_MANAGER_H_
#define MOJO_SHELL_TEST_PACKAGE_MANAGER_H_
-#include <map>
-#include <string>
-
#include "mojo/shell/package_manager.h"
-class GURL;
-
namespace mojo {
namespace shell {
+namespace test {
-// An implementation of PackageManager used by tests to support content handler
-// registration for MIME types.
class TestPackageManager : public PackageManager {
public:
TestPackageManager();
~TestPackageManager() override;
- void RegisterContentHandler(const std::string& mime_type,
- const GURL& content_handler_url);
-
private:
- using MimeTypeToURLMap = std::map<std::string, GURL>;
-
// Overridden from PackageManager:
void SetApplicationManager(ApplicationManager* manager) override;
void FetchRequest(
URLRequestPtr request,
const Fetcher::FetchCallback& loader_callback) override;
- bool HandleWithContentHandler(Fetcher* fetcher,
- const GURL& url,
- base::TaskRunner* task_runner,
- URLResponsePtr* new_response,
- GURL* content_handler_url,
- std::string* qualifier) override;
-
- MimeTypeToURLMap mime_type_to_url_;
+ uint32_t HandleWithContentHandler(
+ Fetcher* fetcher,
+ const Identity& source,
+ const GURL& target_url,
+ const CapabilityFilter& target_filter,
+ InterfaceRequest<Application>* application_request) override;
DISALLOW_COPY_AND_ASSIGN(TestPackageManager);
};
+} // namespace test
} // namespace shell
} // namespace mojo
« no previous file with comments | « mojo/shell/package_manager.h ('k') | mojo/shell/test_package_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698