| 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 // It performs all blocking operations on the blocking task runner, and posts | 24 // It performs all blocking operations on the blocking task runner, and posts | 
| 25 // all callbacks to the thread on which the GCMStoreImpl is created. | 25 // all callbacks to the thread on which the GCMStoreImpl is created. | 
| 26 class GCM_EXPORT GCMStoreImpl : public GCMStore { | 26 class GCM_EXPORT GCMStoreImpl : public GCMStore { | 
| 27  public: | 27  public: | 
| 28   GCMStoreImpl(const base::FilePath& path, | 28   GCMStoreImpl(const base::FilePath& path, | 
| 29                scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, | 29                scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, | 
| 30                scoped_ptr<Encryptor> encryptor); | 30                scoped_ptr<Encryptor> encryptor); | 
| 31   ~GCMStoreImpl() override; | 31   ~GCMStoreImpl() override; | 
| 32 | 32 | 
| 33   // Load the directory and pass the initial state back to caller. | 33   // Load the directory and pass the initial state back to caller. | 
| 34   void Load(const LoadCallback& callback) override; | 34   void Load(StoreOpenMode open_mode, const LoadCallback& callback) override; | 
| 35 | 35 | 
| 36   // Closes the GCM store. | 36   // Closes the GCM store. | 
| 37   void Close() override; | 37   void Close() override; | 
| 38 | 38 | 
| 39   // Clears the GCM store of all data and destroys any LevelDB files associated | 39   // Clears the GCM store of all data and destroys any LevelDB files associated | 
| 40   // with this store. | 40   // with this store. | 
| 41   // WARNING: this will permanently destroy any pending outgoing messages | 41   // WARNING: this will permanently destroy any pending outgoing messages | 
| 42   // and require the device to re-create credentials and serial number mapping | 42   // and require the device to re-create credentials and serial number mapping | 
| 43   // tables. | 43   // tables. | 
| 44   void Destroy(const UpdateCallback& callback) override; | 44   void Destroy(const UpdateCallback& callback) override; | 
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 145   scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 145   scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 
| 146 | 146 | 
| 147   base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; | 147   base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; | 
| 148 | 148 | 
| 149   DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); | 149   DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); | 
| 150 }; | 150 }; | 
| 151 | 151 | 
| 152 }  // namespace gcm | 152 }  // namespace gcm | 
| 153 | 153 | 
| 154 #endif  // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ | 154 #endif  // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ | 
| OLD | NEW | 
|---|