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

Side by Side Diff: sync/syncable/model_neutral_mutable_entry.cc

Issue 302173004: sync: Specialize functions that fetch type root (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/GET_BY_SERVER_TAG_DEPRECATED/GET_BY_SERVER_TAG/ Created 6 years, 6 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
« no previous file with comments | « sync/syncable/model_neutral_mutable_entry.h ('k') | sync/syncable/mutable_entry.h » ('j') | 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 #include "sync/syncable/model_neutral_mutable_entry.h" 5 #include "sync/syncable/model_neutral_mutable_entry.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "sync/internal_api/public/base/unique_position.h" 9 #include "sync/internal_api/public/base/unique_position.h"
10 #include "sync/syncable/directory.h" 10 #include "sync/syncable/directory.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 BaseWriteTransaction* trans, GetByHandle, int64 metahandle) 53 BaseWriteTransaction* trans, GetByHandle, int64 metahandle)
54 : Entry(trans, GET_BY_HANDLE, metahandle), base_write_transaction_(trans) { 54 : Entry(trans, GET_BY_HANDLE, metahandle), base_write_transaction_(trans) {
55 } 55 }
56 56
57 ModelNeutralMutableEntry::ModelNeutralMutableEntry( 57 ModelNeutralMutableEntry::ModelNeutralMutableEntry(
58 BaseWriteTransaction* trans, GetByClientTag, const std::string& tag) 58 BaseWriteTransaction* trans, GetByClientTag, const std::string& tag)
59 : Entry(trans, GET_BY_CLIENT_TAG, tag), base_write_transaction_(trans) { 59 : Entry(trans, GET_BY_CLIENT_TAG, tag), base_write_transaction_(trans) {
60 } 60 }
61 61
62 ModelNeutralMutableEntry::ModelNeutralMutableEntry( 62 ModelNeutralMutableEntry::ModelNeutralMutableEntry(
63 BaseWriteTransaction* trans, GetByServerTag, const string& tag) 63 BaseWriteTransaction* trans, GetTypeRoot, ModelType type)
64 : Entry(trans, GET_BY_SERVER_TAG, tag), base_write_transaction_(trans) { 64 : Entry(trans, GET_TYPE_ROOT, type), base_write_transaction_(trans) {
65 } 65 }
66 66
67 void ModelNeutralMutableEntry::PutBaseVersion(int64 value) { 67 void ModelNeutralMutableEntry::PutBaseVersion(int64 value) {
68 DCHECK(kernel_); 68 DCHECK(kernel_);
69 base_write_transaction_->TrackChangesTo(kernel_); 69 base_write_transaction_->TrackChangesTo(kernel_);
70 if (kernel_->ref(BASE_VERSION) != value) { 70 if (kernel_->ref(BASE_VERSION) != value) {
71 kernel_->put(BASE_VERSION, value); 71 kernel_->put(BASE_VERSION, value);
72 kernel_->mark_dirty(&dir()->kernel_->dirty_metahandles); 72 kernel_->mark_dirty(&dir()->kernel_->dirty_metahandles);
73 } 73 }
74 } 74 }
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 ModelNeutralMutableEntry::ModelNeutralMutableEntry(BaseWriteTransaction* trans) 372 ModelNeutralMutableEntry::ModelNeutralMutableEntry(BaseWriteTransaction* trans)
373 : Entry(trans), base_write_transaction_(trans) {} 373 : Entry(trans), base_write_transaction_(trans) {}
374 374
375 MetahandleSet* ModelNeutralMutableEntry::GetDirtyIndexHelper() { 375 MetahandleSet* ModelNeutralMutableEntry::GetDirtyIndexHelper() {
376 return &dir()->kernel_->dirty_metahandles; 376 return &dir()->kernel_->dirty_metahandles;
377 } 377 }
378 378
379 } // namespace syncable 379 } // namespace syncable
380 380
381 } // namespace syncer 381 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/syncable/model_neutral_mutable_entry.h ('k') | sync/syncable/mutable_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698