| 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 SERVICES_URL_RESPONSE_DISK_CACHE_URL_RESPONSE_DISK_CACHE_APP_H_ | 5 #ifndef SERVICES_URL_RESPONSE_DISK_CACHE_URL_RESPONSE_DISK_CACHE_APP_H_ |
| 6 #define SERVICES_URL_RESPONSE_DISK_CACHE_URL_RESPONSE_DISK_CACHE_APP_H_ | 6 #define SERVICES_URL_RESPONSE_DISK_CACHE_URL_RESPONSE_DISK_CACHE_APP_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/task_runner.h" | 10 #include "base/task_runner.h" |
| 11 #include "base/threading/sequenced_worker_pool.h" | 11 #include "mojo/public/cpp/application/application_impl_base.h" |
| 12 #include "mojo/public/cpp/application/application_delegate.h" | |
| 13 #include "mojo/public/cpp/application/application_impl.h" | |
| 14 #include "mojo/services/url_response_disk_cache/interfaces/url_response_disk_cac
he.mojom.h" | 12 #include "mojo/services/url_response_disk_cache/interfaces/url_response_disk_cac
he.mojom.h" |
| 15 #include "services/url_response_disk_cache/url_response_disk_cache_db.h" | 13 #include "services/url_response_disk_cache/url_response_disk_cache_db.h" |
| 16 #include "services/url_response_disk_cache/url_response_disk_cache_delegate.h" | 14 #include "services/url_response_disk_cache/url_response_disk_cache_delegate.h" |
| 17 | 15 |
| 18 namespace mojo { | 16 namespace mojo { |
| 19 | 17 |
| 20 class URLResponseDiskCacheApp : public ApplicationDelegate { | 18 class URLResponseDiskCacheApp : public ApplicationImplBase { |
| 21 public: | 19 public: |
| 22 explicit URLResponseDiskCacheApp(scoped_refptr<base::TaskRunner> task_runner, | 20 explicit URLResponseDiskCacheApp(scoped_refptr<base::TaskRunner> task_runner, |
| 23 URLResponseDiskCacheDelegate* delegate); | 21 URLResponseDiskCacheDelegate* delegate); |
| 24 ~URLResponseDiskCacheApp() override; | 22 ~URLResponseDiskCacheApp() override; |
| 25 | 23 |
| 26 private: | 24 private: |
| 27 // ApplicationDelegate: | 25 // ApplicationImplBase: |
| 28 void Initialize(ApplicationImpl* app) override; | 26 void OnInitialize() override; |
| 29 bool ConfigureIncomingConnection( | 27 bool OnAcceptConnection(ServiceProviderImpl* service_provider_impl) override; |
| 30 ServiceProviderImpl* service_provider_impl) override; | |
| 31 | 28 |
| 32 scoped_refptr<base::TaskRunner> task_runner_; | 29 scoped_refptr<base::TaskRunner> task_runner_; |
| 33 scoped_refptr<URLResponseDiskCacheDB> db_; | 30 scoped_refptr<URLResponseDiskCacheDB> db_; |
| 34 URLResponseDiskCacheDelegate* delegate_; | 31 URLResponseDiskCacheDelegate* delegate_; |
| 35 | 32 |
| 36 DISALLOW_COPY_AND_ASSIGN(URLResponseDiskCacheApp); | 33 DISALLOW_COPY_AND_ASSIGN(URLResponseDiskCacheApp); |
| 37 }; | 34 }; |
| 38 | 35 |
| 39 } // namespace mojo | 36 } // namespace mojo |
| 40 | 37 |
| 41 #endif // SERVICES_URL_RESPONSE_DISK_CACHE_URL_RESPONSE_DISK_CACHE_APP_H_ | 38 #endif // SERVICES_URL_RESPONSE_DISK_CACHE_URL_RESPONSE_DISK_CACHE_APP_H_ |
| OLD | NEW |