| OLD | NEW |
| 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_UPDATE_FETCHER_H_ | 5 #ifndef MOJO_FETCHER_UPDATE_FETCHER_H_ |
| 6 #define MOJO_SHELL_UPDATE_FETCHER_H_ | 6 #define MOJO_FETCHER_UPDATE_FETCHER_H_ |
| 7 | 7 |
| 8 #include "mojo/shell/fetcher.h" | 8 #include "mojo/shell/fetcher.h" |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "mojo/services/updater/updater.mojom.h" | 12 #include "mojo/services/updater/updater.mojom.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 namespace mojo { | 15 namespace mojo { |
| 16 | 16 |
| 17 class URLLoaderFactory; | 17 class URLLoaderFactory; |
| 18 | 18 |
| 19 namespace shell { | 19 namespace fetcher { |
| 20 | 20 |
| 21 class UpdateFetcher : public Fetcher { | 21 class UpdateFetcher : public shell::Fetcher { |
| 22 public: | 22 public: |
| 23 UpdateFetcher(const GURL& url, | 23 UpdateFetcher(const GURL& url, |
| 24 updater::Updater* updater, | 24 updater::Updater* updater, |
| 25 const FetchCallback& loader_callback); | 25 const FetchCallback& loader_callback); |
| 26 | 26 |
| 27 ~UpdateFetcher() override; | 27 ~UpdateFetcher() override; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 // Fetcher implementation: | 30 // Fetcher implementation: |
| 31 const GURL& GetURL() const override; | 31 const GURL& GetURL() const override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 42 | 42 |
| 43 void OnGetAppPath(const mojo::String& path); | 43 void OnGetAppPath(const mojo::String& path); |
| 44 | 44 |
| 45 const GURL url_; | 45 const GURL url_; |
| 46 base::FilePath path_; | 46 base::FilePath path_; |
| 47 base::WeakPtrFactory<UpdateFetcher> weak_ptr_factory_; | 47 base::WeakPtrFactory<UpdateFetcher> weak_ptr_factory_; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(UpdateFetcher); | 49 DISALLOW_COPY_AND_ASSIGN(UpdateFetcher); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace shell | 52 } // namespace fetcher |
| 53 } // namespace mojo | 53 } // namespace mojo |
| 54 | 54 |
| 55 #endif // MOJO_SHELL_UPDATE_FETCHER_H_ | 55 #endif // MOJO_FETCHER_UPDATE_FETCHER_H_ |
| OLD | NEW |