OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ | 5 #ifndef GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ |
6 #define GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ | 6 #define GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class GCM_EXPORT GCMStoreImpl : public GCMStore { | 24 class GCM_EXPORT GCMStoreImpl : public GCMStore { |
25 public: | 25 public: |
26 GCMStoreImpl(bool use_mock_keychain, | 26 GCMStoreImpl(bool use_mock_keychain, |
27 const base::FilePath& path, | 27 const base::FilePath& path, |
28 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner); | 28 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner); |
29 virtual ~GCMStoreImpl(); | 29 virtual ~GCMStoreImpl(); |
30 | 30 |
31 // Load the directory and pass the initial state back to caller. | 31 // Load the directory and pass the initial state back to caller. |
32 virtual void Load(const LoadCallback& callback) OVERRIDE; | 32 virtual void Load(const LoadCallback& callback) OVERRIDE; |
33 | 33 |
| 34 // Closes the GCM store. |
| 35 virtual void Close() OVERRIDE; |
| 36 |
34 // Clears the GCM store of all data and destroys any LevelDB files associated | 37 // Clears the GCM store of all data and destroys any LevelDB files associated |
35 // with this store. | 38 // with this store. |
36 // WARNING: this will permanently destroy any pending outgoing messages | 39 // WARNING: this will permanently destroy any pending outgoing messages |
37 // and require the device to re-create credentials and serial number mapping | 40 // and require the device to re-create credentials and serial number mapping |
38 // tables. | 41 // tables. |
39 virtual void Destroy(const UpdateCallback& callback) OVERRIDE; | 42 virtual void Destroy(const UpdateCallback& callback) OVERRIDE; |
40 | 43 |
41 // Sets this device's messaging credentials. | 44 // Sets this device's messaging credentials. |
42 virtual void SetDeviceCredentials(uint64 device_android_id, | 45 virtual void SetDeviceCredentials(uint64 device_android_id, |
43 uint64 device_security_token, | 46 uint64 device_security_token, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 107 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
105 | 108 |
106 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; | 109 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; |
107 | 110 |
108 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); | 111 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); |
109 }; | 112 }; |
110 | 113 |
111 } // namespace gcm | 114 } // namespace gcm |
112 | 115 |
113 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ | 116 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ |
OLD | NEW |