| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_QUIRKS_QUIRKS_CLIENT_H_ | 5 #ifndef COMPONENTS_QUIRKS_QUIRKS_CLIENT_H_ |
| 6 #define COMPONENTS_QUIRKS_QUIRKS_CLIENT_H_ | 6 #define COMPONENTS_QUIRKS_QUIRKS_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "base/threading/thread_checker.h" | 12 #include "base/threading/thread_checker.h" |
| 12 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
| 13 #include "net/base/backoff_entry.h" | 14 #include "net/base/backoff_entry.h" |
| 14 #include "net/url_request/url_fetcher_delegate.h" | 15 #include "net/url_request/url_fetcher_delegate.h" |
| 15 | 16 |
| 16 namespace quirks { | 17 namespace quirks { |
| 17 | 18 |
| 18 class QuirksManager; | 19 class QuirksManager; |
| 19 | 20 |
| 20 // See declaration in quirks_manager.h. | 21 // See declaration in quirks_manager.h. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Weak pointer owned by manager, guaranteed to outlive this client object. | 56 // Weak pointer owned by manager, guaranteed to outlive this client object. |
| 56 QuirksManager* manager_; | 57 QuirksManager* manager_; |
| 57 | 58 |
| 58 // Full path to icc file. | 59 // Full path to icc file. |
| 59 const base::FilePath icc_path_; | 60 const base::FilePath icc_path_; |
| 60 | 61 |
| 61 // The class is expected to run on UI thread. | 62 // The class is expected to run on UI thread. |
| 62 base::ThreadChecker thread_checker_; | 63 base::ThreadChecker thread_checker_; |
| 63 | 64 |
| 64 // This fetcher is used to download icc file. | 65 // This fetcher is used to download icc file. |
| 65 scoped_ptr<net::URLFetcher> url_fetcher_; | 66 std::unique_ptr<net::URLFetcher> url_fetcher_; |
| 66 | 67 |
| 67 // Pending retry. | 68 // Pending retry. |
| 68 base::OneShotTimer request_scheduled_; | 69 base::OneShotTimer request_scheduled_; |
| 69 | 70 |
| 70 // Controls exponential backoff of time between server checks. | 71 // Controls exponential backoff of time between server checks. |
| 71 net::BackoffEntry backoff_entry_; | 72 net::BackoffEntry backoff_entry_; |
| 72 | 73 |
| 73 // Factory for callbacks. | 74 // Factory for callbacks. |
| 74 base::WeakPtrFactory<QuirksClient> weak_ptr_factory_; | 75 base::WeakPtrFactory<QuirksClient> weak_ptr_factory_; |
| 75 | 76 |
| 76 DISALLOW_COPY_AND_ASSIGN(QuirksClient); | 77 DISALLOW_COPY_AND_ASSIGN(QuirksClient); |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 } // namespace quirks | 80 } // namespace quirks |
| 80 | 81 |
| 81 #endif // COMPONENTS_QUIRKS_QUIRKS_CLIENT_H_ | 82 #endif // COMPONENTS_QUIRKS_QUIRKS_CLIENT_H_ |
| OLD | NEW |