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_OFFLINE_PAGES_BACKGROUND_INITIALIZE_STORE_TASK_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND____CORE_BACKGROUND_INITIALIZE_STORE_
TASK_H_ |
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_INITIALIZE_STORE_TASK_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND____CORE_BACKGROUND_INITIALIZE_STORE_
TASK_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "components/offline_pages/background/request_queue_store.h" | 11 #include "components/offline_pages/core/background/request_queue_store.h" |
12 #include "components/offline_pages/core/task.h" | 12 #include "components/offline_pages/core/task.h" |
13 | 13 |
14 namespace offline_pages { | 14 namespace offline_pages { |
15 | 15 |
16 // Task performing a request queue store initialization and reset if one is | 16 // Task performing a request queue store initialization and reset if one is |
17 // necessary. Reset is triggered in case the initialization fails. If reset | 17 // necessary. Reset is triggered in case the initialization fails. If reset |
18 // fails (perhaps not able to delete the folder or raze the database in case of | 18 // fails (perhaps not able to delete the folder or raze the database in case of |
19 // SQLite-backed store) a new attempt can be made. Number of attempts is limited | 19 // SQLite-backed store) a new attempt can be made. Number of attempts is limited |
20 // by |reset_attempts_left_|. Successful reset will be followed by another | 20 // by |reset_attempts_left_|. Successful reset will be followed by another |
21 // attempt to initialize the database. | 21 // attempt to initialize the database. |
(...skipping 26 matching lines...) Expand all Loading... |
48 int reset_attempts_left_; | 48 int reset_attempts_left_; |
49 // Callback to complete the task. | 49 // Callback to complete the task. |
50 RequestQueueStore::InitializeCallback callback_; | 50 RequestQueueStore::InitializeCallback callback_; |
51 | 51 |
52 base::WeakPtrFactory<InitializeStoreTask> weak_ptr_factory_; | 52 base::WeakPtrFactory<InitializeStoreTask> weak_ptr_factory_; |
53 DISALLOW_COPY_AND_ASSIGN(InitializeStoreTask); | 53 DISALLOW_COPY_AND_ASSIGN(InitializeStoreTask); |
54 }; | 54 }; |
55 | 55 |
56 } // namespace offline_pages | 56 } // namespace offline_pages |
57 | 57 |
58 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_INITIALIZE_STORE_TASK_H_ | 58 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND____CORE_BACKGROUND_INITIALIZE_STO
RE_TASK_H_ |
OLD | NEW |