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

Unified Diff: mojo/fetcher/base_application_fetcher.h

Issue 1342503003: Move fetching logic out of ApplicationManager, eliminate url mappings. (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
Index: mojo/fetcher/base_application_fetcher.h
diff --git a/mojo/fetcher/base_application_fetcher.h b/mojo/fetcher/base_application_fetcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..7f49fd1f567960a189cfb06daafa78d095d16f91
--- /dev/null
+++ b/mojo/fetcher/base_application_fetcher.h
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/files/file_path.h"
+#include "mojo/fetcher/url_resolver.h"
+#include "mojo/services/network/public/interfaces/network_service.mojom.h"
+#include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h"
+#include "mojo/shell/application_fetcher.h"
+
+namespace mojo {
+namespace fetcher {
+
+class BaseApplicationFetcher : public shell::ApplicationFetcher {
sky 2015/09/11 23:05:27 Description (it isn't clear that a base applicatio
+ public:
+ explicit BaseApplicationFetcher(const base::FilePath& shell_file_root);
+ ~BaseApplicationFetcher() override;
+
+ private:
+ // Overridden from shell::ApplicationFetcher:
+ void SetApplicationManager(shell::ApplicationManager* manager) override;
+ GURL ResolveURL(const GURL& url) override;
+ void FetchRequest(
+ URLRequestPtr request,
+ const shell::Fetcher::FetchCallback& loader_callback) override;
+
+ shell::ApplicationManager* application_manager_;
sky 2015/09/11 23:05:27 initialize to null.
+ scoped_ptr<URLResolver> url_resolver_;
+ bool disable_cache_;
sky 2015/09/11 23:05:27 nit: const
+ NetworkServicePtr network_service_;
+ URLLoaderFactoryPtr url_loader_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(BaseApplicationFetcher);
+};
+
+} // namespace fetcher
+} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698