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

Side by Side Diff: mojo/fetcher/local_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 unified diff | Download patch
« no previous file with comments | « mojo/fetcher/base_application_fetcher.cc ('k') | mojo/fetcher/local_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_SHELL_LOCAL_FETCHER_H_ 5 #ifndef MOJO_FETCHER_LOCAL_FETCHER_H_
6 #define MOJO_SHELL_LOCAL_FETCHER_H_ 6 #define MOJO_FETCHER_LOCAL_FETCHER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "mojo/shell/fetcher.h" 11 #include "mojo/shell/fetcher.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 15
16 class NetworkService; 16 class NetworkService;
17 17
18 namespace shell { 18 namespace fetcher {
19 19
20 // Implements Fetcher for file:// URLs. 20 // Implements Fetcher for file:// URLs.
21 class LocalFetcher : public Fetcher { 21 class LocalFetcher : public shell::Fetcher {
22 public: 22 public:
23 LocalFetcher(NetworkService* network_service, 23 LocalFetcher(NetworkService* network_service,
24 const GURL& url, 24 const GURL& url,
25 const GURL& url_without_query, 25 const GURL& url_without_query,
26 const FetchCallback& loader_callback); 26 const FetchCallback& loader_callback);
27 27
28 void GetMimeTypeFromFileCallback(const mojo::String& mime_type); 28 void GetMimeTypeFromFileCallback(const mojo::String& mime_type);
29 29
30 private: 30 private:
31 const GURL& GetURL() const override; 31 const GURL& GetURL() const override;
(...skipping 13 matching lines...) Expand all
45 45
46 bool PeekFirstLine(std::string* line) override; 46 bool PeekFirstLine(std::string* line) override;
47 47
48 GURL url_; 48 GURL url_;
49 base::FilePath path_; 49 base::FilePath path_;
50 std::string mime_type_; 50 std::string mime_type_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(LocalFetcher); 52 DISALLOW_COPY_AND_ASSIGN(LocalFetcher);
53 }; 53 };
54 54
55 } // namespace shell 55 } // namespace fetcher
56
57 } // namespace mojo 56 } // namespace mojo
58 57
59 #endif // MOJO_SHELL_LOCAL_FETCHER_H_ 58 #endif // MOJO_FETCHER_LOCAL_FETCHER_H_
OLDNEW
« no previous file with comments | « mojo/fetcher/base_application_fetcher.cc ('k') | mojo/fetcher/local_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698