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

Side by Side Diff: mojo/fetcher/update_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/fetcher/switches.cc ('k') | mojo/fetcher/update_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
(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 MOJO_FETCHER_UPDATE_FETCHER_H_
6 #define MOJO_FETCHER_UPDATE_FETCHER_H_
7
8 #include "mojo/shell/fetcher.h"
9
10 #include <stdint.h>
11
12 #include "base/files/file_path.h"
13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h"
15 #include "mojo/services/updater/updater.mojom.h"
16 #include "url/gurl.h"
17
18 namespace mojo {
19
20 class URLLoaderFactory;
21
22 namespace fetcher {
23
24 class UpdateFetcher : public shell::Fetcher {
25 public:
26 UpdateFetcher(const GURL& url,
27 updater::Updater* updater,
28 const FetchCallback& loader_callback);
29
30 ~UpdateFetcher() override;
31
32 private:
33 // Fetcher implementation:
34 const GURL& GetURL() const override;
35 GURL GetRedirectURL() const override;
36 GURL GetRedirectReferer() const override;
37 URLResponsePtr AsURLResponse(base::TaskRunner* task_runner,
38 uint32_t skip) override;
39 void AsPath(
40 base::TaskRunner* task_runner,
41 base::Callback<void(const base::FilePath&, bool)> callback) override;
42 std::string MimeType() override;
43 bool HasMojoMagic() override;
44 bool PeekFirstLine(std::string* line) override;
45
46 void OnGetAppPath(const mojo::String& path);
47
48 const GURL url_;
49 base::FilePath path_;
50 base::WeakPtrFactory<UpdateFetcher> weak_ptr_factory_;
51
52 DISALLOW_COPY_AND_ASSIGN(UpdateFetcher);
53 };
54
55 } // namespace fetcher
56 } // namespace mojo
57
58 #endif // MOJO_FETCHER_UPDATE_FETCHER_H_
OLDNEW
« no previous file with comments | « mojo/fetcher/switches.cc ('k') | mojo/fetcher/update_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698