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

Side by Side Diff: chrome/browser/sync/engine/build_commit_command.cc

Issue 429003: Final part of PathString cleanup. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | « no previous file | chrome/browser/sync/engine/process_commit_response_command.cc » ('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 (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 "chrome/browser/sync/engine/build_commit_command.h" 5 #include "chrome/browser/sync/engine/build_commit_command.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 SyncEntity* sync_entry = 59 SyncEntity* sync_entry =
60 static_cast<SyncEntity*>(commit_message->add_entries()); 60 static_cast<SyncEntity*>(commit_message->add_entries());
61 sync_entry->set_id(id); 61 sync_entry->set_id(id);
62 MutableEntry meta_entry(session->write_transaction(), 62 MutableEntry meta_entry(session->write_transaction(),
63 syncable::GET_BY_ID, 63 syncable::GET_BY_ID,
64 id); 64 id);
65 CHECK(meta_entry.good()); 65 CHECK(meta_entry.good());
66 // This is the only change we make to the entry in this function. 66 // This is the only change we make to the entry in this function.
67 meta_entry.Put(syncable::SYNCING, true); 67 meta_entry.Put(syncable::SYNCING, true);
68 68
69 PathString name = meta_entry.Get(syncable::NON_UNIQUE_NAME); 69 string name = meta_entry.Get(syncable::NON_UNIQUE_NAME);
70 CHECK(!name.empty()); // Make sure this isn't an update. 70 CHECK(!name.empty()); // Make sure this isn't an update.
71 sync_entry->set_name(name); 71 sync_entry->set_name(name);
72 72
73 // Set the non_unique_name. If we do, the server ignores 73 // Set the non_unique_name. If we do, the server ignores
74 // the |name| value (using |non_unique_name| instead), and will return 74 // the |name| value (using |non_unique_name| instead), and will return
75 // in the CommitResponse a unique name if one is generated. 75 // in the CommitResponse a unique name if one is generated.
76 // We send both because it may aid in logging. 76 // We send both because it may aid in logging.
77 sync_entry->set_non_unique_name(name); 77 sync_entry->set_non_unique_name(name);
78 78
79 // Deleted items with negative parent ids can be a problem so we set the 79 // Deleted items with negative parent ids can be a problem so we set the
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 SyncerProtoUtil::CopyBlobIntoProtoBytes( 145 SyncerProtoUtil::CopyBlobIntoProtoBytes(
146 meta_entry.Get(syncable::BOOKMARK_FAVICON), 146 meta_entry.Get(syncable::BOOKMARK_FAVICON),
147 bookmark->mutable_bookmark_favicon()); 147 bookmark->mutable_bookmark_favicon());
148 } 148 }
149 } 149 }
150 } 150 }
151 session->status_controller()->mutable_commit_message()->CopyFrom(message); 151 session->status_controller()->mutable_commit_message()->CopyFrom(message);
152 } 152 }
153 153
154 } // namespace browser_sync 154 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/engine/process_commit_response_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698