Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(568)

Side by Side Diff: trunk/src/google_apis/gcm/engine/gcm_store_impl.h

Issue 281783004: Revert 270226 "Componentize GCM Part 1: create GCM component and..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "google_apis/gcm/base/gcm_export.h" 11 #include "google_apis/gcm/base/gcm_export.h"
12 #include "google_apis/gcm/engine/gcm_store.h" 12 #include "google_apis/gcm/engine/gcm_store.h"
13 13
14 namespace base { 14 namespace base {
15 class FilePath; 15 class FilePath;
16 class SequencedTaskRunner; 16 class SequencedTaskRunner;
17 } // namespace base 17 } // namespace base
18 18
19 namespace gcm { 19 namespace gcm {
20 20
21 class Encryptor;
22
23 // An implementation of GCM Store that uses LevelDB for persistence. 21 // An implementation of GCM Store that uses LevelDB for persistence.
24 // It performs all blocking operations on the blocking task runner, and posts 22 // It performs all blocking operations on the blocking task runner, and posts
25 // all callbacks to the thread on which the GCMStoreImpl is created. 23 // all callbacks to the thread on which the GCMStoreImpl is created.
26 class GCM_EXPORT GCMStoreImpl : public GCMStore { 24 class GCM_EXPORT GCMStoreImpl : public GCMStore {
27 public: 25 public:
28 GCMStoreImpl(const base::FilePath& path, 26 GCMStoreImpl(const base::FilePath& path,
29 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, 27 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner);
30 scoped_ptr<Encryptor> encryptor);
31 virtual ~GCMStoreImpl(); 28 virtual ~GCMStoreImpl();
32 29
33 // Load the directory and pass the initial state back to caller. 30 // Load the directory and pass the initial state back to caller.
34 virtual void Load(const LoadCallback& callback) OVERRIDE; 31 virtual void Load(const LoadCallback& callback) OVERRIDE;
35 32
36 // Closes the GCM store. 33 // Closes the GCM store.
37 virtual void Close() OVERRIDE; 34 virtual void Close() OVERRIDE;
38 35
39 // Clears the GCM store of all data and destroys any LevelDB files associated 36 // Clears the GCM store of all data and destroys any LevelDB files associated
40 // with this store. 37 // with this store.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 114 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
118 115
119 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; 116 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_;
120 117
121 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); 118 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl);
122 }; 119 };
123 120
124 } // namespace gcm 121 } // namespace gcm
125 122
126 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ 123 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_
OLDNEW
« no previous file with comments | « trunk/src/google_apis/gcm/base/fake_encryptor.cc ('k') | trunk/src/google_apis/gcm/engine/gcm_store_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698