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

Side by Side Diff: components/dom_distiller/core/dom_distiller_store.h

Issue 63553009: Initialize DomDistillerStore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add include Created 7 years, 1 month 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
« no previous file with comments | « components/dom_distiller/content/dom_distiller_service_factory.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_DOM_DISTILLER_CORE_DOM_DISTILLER_STORE_H_ 5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_STORE_H_
6 #define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_STORE_H_ 6 #define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_STORE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // 1. convert the change to a SyncChangeList. 58 // 1. convert the change to a SyncChangeList.
59 // 2. apply that change to the in-memory model, calculating what changed 59 // 2. apply that change to the in-memory model, calculating what changed
60 // (changes_applied) and what is missing--i.e. entries missing for a full merge, 60 // (changes_applied) and what is missing--i.e. entries missing for a full merge,
61 // conflict resolution for normal changes-- (changes_missing). 61 // conflict resolution for normal changes-- (changes_missing).
62 // 3. send a message (possibly handled asynchronously) containing 62 // 3. send a message (possibly handled asynchronously) containing
63 // changes_missing to the source of the change. 63 // changes_missing to the source of the change.
64 // 4. send messages (possibly handled asynchronously) containing changes_applied 64 // 4. send messages (possibly handled asynchronously) containing changes_applied
65 // to the other (i.e. non-source) two models. 65 // to the other (i.e. non-source) two models.
66 // TODO(cjhopman): Support deleting entries. 66 // TODO(cjhopman): Support deleting entries.
67 class DomDistillerStore : public syncer::SyncableService, 67 class DomDistillerStore : public syncer::SyncableService,
68 DomDistillerStoreInterface { 68 public DomDistillerStoreInterface {
69 public: 69 public:
70 // Creates storage using the given database for local storage. Initializes the 70 // Creates storage using the given database for local storage. Initializes the
71 // database with |database_dir|. 71 // database with |database_dir|.
72 DomDistillerStore(scoped_ptr<DomDistillerDatabaseInterface> database, 72 DomDistillerStore(scoped_ptr<DomDistillerDatabaseInterface> database,
73 const base::FilePath& database_dir); 73 const base::FilePath& database_dir);
74 74
75 // Creates storage using the given database for local storage. Initializes the 75 // Creates storage using the given database for local storage. Initializes the
76 // database with |database_dir|. Also initializes the internal model to 76 // database with |database_dir|. Also initializes the internal model to
77 // |initial_model|. 77 // |initial_model|.
78 DomDistillerStore(scoped_ptr<DomDistillerDatabaseInterface> database, 78 DomDistillerStore(scoped_ptr<DomDistillerDatabaseInterface> database,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 DomDistillerModel model_; 136 DomDistillerModel model_;
137 137
138 base::WeakPtrFactory<DomDistillerStore> weak_ptr_factory_; 138 base::WeakPtrFactory<DomDistillerStore> weak_ptr_factory_;
139 139
140 DISALLOW_COPY_AND_ASSIGN(DomDistillerStore); 140 DISALLOW_COPY_AND_ASSIGN(DomDistillerStore);
141 }; 141 };
142 142
143 } // namespace dom_distiller 143 } // namespace dom_distiller
144 144
145 #endif 145 #endif
OLDNEW
« no previous file with comments | « components/dom_distiller/content/dom_distiller_service_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698