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

Side by Side Diff: mojo/shell/application_manager/local_fetcher.h

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 8 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SHELL_APPLICATION_MANAGER_LOCAL_FETCHER_H_
6 #define SHELL_APPLICATION_MANAGER_LOCAL_FETCHER_H_
7
8 #include "base/files/file_path.h"
9 #include "mojo/services/network/public/interfaces/url_loader.mojom.h"
10 #include "mojo/shell/application_manager/fetcher.h"
11 #include "url/gurl.h"
12
13 namespace mojo {
14 namespace shell {
15
16 // Implements Fetcher for file:// URLs.
17 class LocalFetcher : public Fetcher {
18 public:
19 LocalFetcher(const GURL& url,
20 const GURL& url_without_query,
21 const FetchCallback& loader_callback);
22
23 private:
24 static base::FilePath UrlToFile(const GURL& url);
25
26 const GURL& GetURL() const override;
27 GURL GetRedirectURL() const override;
28
29 URLResponsePtr AsURLResponse(base::TaskRunner* task_runner,
30 uint32_t skip) override;
31
32 void AsPath(
33 base::TaskRunner* task_runner,
34 base::Callback<void(const base::FilePath&, bool)> callback) override;
35
36 std::string MimeType() override;
37
38 bool HasMojoMagic() override;
39
40 bool PeekFirstLine(std::string* line) override;
41
42 GURL url_;
43 base::FilePath path_;
44
45 DISALLOW_COPY_AND_ASSIGN(LocalFetcher);
46 };
47
48 } // namespace shell
49 } // namespace mojo
50
51 #endif // SHELL_APPLICATION_MANAGER_LOCAL_FETCHER_H_
OLDNEW
« no previous file with comments | « mojo/shell/application_manager/identity.cc ('k') | mojo/shell/application_manager/local_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698