summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/syncable/syncable.h
diff options
context:
space:
mode:
authorlipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-24 00:52:25 +0000
committerlipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-24 00:52:25 +0000
commit54c833622553a4feff635400279619f339dad3dd (patch)
treef2bc0c5b6b8469d581da9927ba63d875fec27516 /chrome/browser/sync/syncable/syncable.h
parent1c06528e287df18771a2e2da1d1fce6258316a1b (diff)
downloadchromium_src-54c833622553a4feff635400279619f339dad3dd.zip
chromium_src-54c833622553a4feff635400279619f339dad3dd.tar.gz
chromium_src-54c833622553a4feff635400279619f339dad3dd.tar.bz2
Autofill work:
1. Added a command line swithc to facilitate incremental checking in of autofill code. 2. Autofill profile model associator. 3. Part of the upgrade code.(The part to take the latest changes from server on the legacy type) Review URL: http://codereview.chromium.org/5126001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67189 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/syncable/syncable.h')
-rw-r--r--chrome/browser/sync/syncable/syncable.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/chrome/browser/sync/syncable/syncable.h b/chrome/browser/sync/syncable/syncable.h
index c26232f7..19d98ee 100644
--- a/chrome/browser/sync/syncable/syncable.h
+++ b/chrome/browser/sync/syncable/syncable.h
@@ -726,7 +726,7 @@ class Directory {
// an account. We keep this for each datatype. It doesn't actually map
// to any time scale; its name is an historical artifact.
int64 last_download_timestamp(ModelType type) const;
- void set_last_download_timestamp(ModelType type, int64 value);
+ virtual void set_last_download_timestamp(ModelType type, int64 value);
// Find the model type or model types which have the least timestamp, and
// return them along with the types having that timestamp. This is done
@@ -773,11 +773,12 @@ class Directory {
browser_sync::ChannelEventHandler<DirectoryChangeEvent>* observer);
protected: // for friends, mainly used by Entry constructors
- EntryKernel* GetEntryByHandle(const int64 handle);
- EntryKernel* GetEntryByHandle(const int64 metahandle, ScopedKernelLock* lock);
- EntryKernel* GetEntryById(const Id& id);
+ virtual EntryKernel* GetEntryByHandle(int64 handle);
+ virtual EntryKernel* GetEntryByHandle(int64 metahandle,
+ ScopedKernelLock* lock);
+ virtual EntryKernel* GetEntryById(const Id& id);
EntryKernel* GetEntryByServerTag(const std::string& tag);
- EntryKernel* GetEntryByClientTag(const std::string& tag);
+ virtual EntryKernel* GetEntryByClientTag(const std::string& tag);
EntryKernel* GetRootEntry();
bool ReindexId(EntryKernel* const entry, const Id& new_id);
void ReindexParentId(EntryKernel* const entry, const Id& new_parent_id);
@@ -823,7 +824,7 @@ class Directory {
// Find the first or last child in the positional ordering under a parent,
// and return its id. Returns a root Id if parent has no children.
- Id GetFirstChildId(BaseTransaction* trans, const Id& parent_id);
+ virtual Id GetFirstChildId(BaseTransaction* trans, const Id& parent_id);
Id GetLastChildId(BaseTransaction* trans, const Id& parent_id);
// SaveChanges works by taking a consistent snapshot of the current Directory
@@ -1058,6 +1059,9 @@ class BaseTransaction {
BaseTransaction(Directory* directory, const char* name,
const char* source_file, int line, WriterTag writer);
+ // For unit testing. Everything will be mocked out no point initializing.
+ explicit BaseTransaction(Directory* directory);
+
void UnlockAndLog(OriginalEntries* entries);
bool NotifyTransactionChangingAndEnding(OriginalEntries* entries);
virtual void NotifyTransactionComplete();
@@ -1112,6 +1116,8 @@ class WriteTransaction : public BaseTransaction {
// is done.
OriginalEntries* const originals_;
+ explicit WriteTransaction(Directory *directory);
+
DISALLOW_COPY_AND_ASSIGN(WriteTransaction);
};