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

Side by Side Diff: mojo/shell/update_fetcher.h

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

Powered by Google App Engine
This is Rietveld 408576698