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

Side by Side Diff: mojo/shell/fetcher/network_fetcher.h

Issue 1563413002: Move fetchers into mojo/shell/fetcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « mojo/shell/fetcher/local_fetcher.cc ('k') | mojo/shell/fetcher/network_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_FETCHER_NETWORK_FETCHER_H_ 5 #ifndef MOJO_SHELL_FETCHER_NETWORK_FETCHER_H_
6 #define MOJO_FETCHER_NETWORK_FETCHER_H_ 6 #define MOJO_SHELL_FETCHER_NETWORK_FETCHER_H_
7 7
8 #include "mojo/shell/fetcher.h" 8 #include "mojo/shell/fetcher.h"
9 9
10 #include <stdint.h> 10 #include <stdint.h>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" 15 #include "mojo/services/network/public/interfaces/url_loader.mojom.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 17
18 namespace mojo { 18 namespace mojo {
19 19
20 class URLLoaderFactory; 20 class URLLoaderFactory;
21 21
22 namespace fetcher { 22 namespace shell {
23 23
24 // Implements Fetcher for http[s] files. 24 // Implements Fetcher for http[s] files.
25 class NetworkFetcher : public shell::Fetcher { 25 class NetworkFetcher : public Fetcher {
26 public: 26 public:
27 NetworkFetcher(bool disable_cache, 27 NetworkFetcher(bool disable_cache,
28 mojo::URLRequestPtr request, 28 mojo::URLRequestPtr request,
29 URLLoaderFactory* url_loader_factory, 29 URLLoaderFactory* url_loader_factory,
30 const FetchCallback& loader_callback); 30 const FetchCallback& loader_callback);
31 31
32 ~NetworkFetcher() override; 32 ~NetworkFetcher() override;
33 33
34 private: 34 private:
35 // TODO(hansmuller): Revisit this when a real peek operation is available. 35 // TODO(hansmuller): Revisit this when a real peek operation is available.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 bool disable_cache_; 75 bool disable_cache_;
76 const GURL url_; 76 const GURL url_;
77 URLLoaderPtr url_loader_; 77 URLLoaderPtr url_loader_;
78 URLResponsePtr response_; 78 URLResponsePtr response_;
79 base::FilePath path_; 79 base::FilePath path_;
80 base::WeakPtrFactory<NetworkFetcher> weak_ptr_factory_; 80 base::WeakPtrFactory<NetworkFetcher> weak_ptr_factory_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(NetworkFetcher); 82 DISALLOW_COPY_AND_ASSIGN(NetworkFetcher);
83 }; 83 };
84 84
85 } // namespace fetcher 85 } // namespace shell
86 } // namespace mojo 86 } // namespace mojo
87 87
88 #endif // MOJO_FETCHER_NETWORK_FETCHER_H_ 88 #endif // MOJO_SHELL_FETCHER_NETWORK_FETCHER_H_
OLDNEW
« no previous file with comments | « mojo/shell/fetcher/local_fetcher.cc ('k') | mojo/shell/fetcher/network_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698