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/dynamic_application_loader.h

Issue 513573002: Mojo: Fix two bugs in content handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/shell/dynamic_application_loader.h
diff --git a/mojo/shell/dynamic_application_loader.h b/mojo/shell/dynamic_application_loader.h
index 36546e985ae453d65c298978da55e08e3e730347..77867a6374627d12672f6f861add35fc5e2aa786 100644
--- a/mojo/shell/dynamic_application_loader.h
+++ b/mojo/shell/dynamic_application_loader.h
@@ -7,6 +7,7 @@
#include <map>
+#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
@@ -44,28 +45,21 @@ class DynamicApplicationLoader : public ApplicationLoader {
const GURL& url) OVERRIDE;
private:
+ class Loader;
+ class LocalLoader;
+ class NetworkLoader;
+
typedef std::map<std::string, GURL> MimeTypeToURLMap;
+ typedef base::Callback<void(Loader*)> LoaderCompleteCallback;
- void LoadLocalService(const GURL& resolved_url,
- scoped_refptr<LoadCallbacks> callbacks);
- void LoadNetworkService(const GURL& resolved_url,
- scoped_refptr<LoadCallbacks> callbacks);
- void OnLoadNetworkServiceComplete(scoped_refptr<LoadCallbacks> callbacks,
- URLResponsePtr url_response);
- void RunLibrary(const base::FilePath& response_file,
- scoped_refptr<LoadCallbacks> callbacks,
- bool delete_file_after,
- bool response_path_exists);
- void OnRunLibraryComplete(DynamicServiceRunner* runner,
- const base::FilePath& temp_file);
+ void LoaderComplete(Loader* loader);
Context* const context_;
scoped_ptr<DynamicServiceRunnerFactory> runner_factory_;
- ScopedVector<DynamicServiceRunner> runners_;
NetworkServicePtr network_service_;
- URLLoaderPtr url_loader_;
MimeTypeToURLMap mime_type_to_url_;
- base::WeakPtrFactory<DynamicApplicationLoader> weak_ptr_factory_;
+ ScopedVector<Loader> loaders_;
+ LoaderCompleteCallback loader_complete_callback_;
DISALLOW_COPY_AND_ASSIGN(DynamicApplicationLoader);
};
« no previous file with comments | « mojo/services/public/interfaces/content_handler/content_handler.mojom ('k') | mojo/shell/dynamic_application_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698