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

Side by Side Diff: chrome/browser/extensions/settings/settings_sync_util.cc

Issue 11533008: Use delete journal to remove bookmarks that are already deleted in sync model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/settings/settings_sync_util.h" 5 #include "chrome/browser/extensions/settings/settings_sync_util.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "sync/protocol/app_setting_specifics.pb.h" 9 #include "sync/protocol/app_setting_specifics.pb.h"
10 #include "sync/protocol/extension_setting_specifics.pb.h" 10 #include "sync/protocol/extension_setting_specifics.pb.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 key, 62 key,
63 value, 63 value,
64 specifics.mutable_app_setting()); 64 specifics.mutable_app_setting());
65 break; 65 break;
66 66
67 default: 67 default:
68 NOTREACHED(); 68 NOTREACHED();
69 } 69 }
70 70
71 return syncer::SyncData::CreateLocalData( 71 return syncer::SyncData::CreateLocalData(
72 extension_id + "/" + key, key, specifics); 72 extension_id + "/" + key, key, specifics, false);
73 } 73 }
74 74
75 syncer::SyncChange CreateAdd( 75 syncer::SyncChange CreateAdd(
76 const std::string& extension_id, 76 const std::string& extension_id,
77 const std::string& key, 77 const std::string& key,
78 const Value& value, 78 const Value& value,
79 syncer::ModelType type) { 79 syncer::ModelType type) {
80 return syncer::SyncChange( 80 return syncer::SyncChange(
81 FROM_HERE, 81 FROM_HERE,
82 syncer::SyncChange::ACTION_ADD, 82 syncer::SyncChange::ACTION_ADD,
(...skipping 18 matching lines...) Expand all
101 DictionaryValue no_value; 101 DictionaryValue no_value;
102 return syncer::SyncChange( 102 return syncer::SyncChange(
103 FROM_HERE, 103 FROM_HERE,
104 syncer::SyncChange::ACTION_DELETE, 104 syncer::SyncChange::ACTION_DELETE,
105 CreateData(extension_id, key, no_value, type)); 105 CreateData(extension_id, key, no_value, type));
106 } 106 }
107 107
108 } // namespace settings_sync_util 108 } // namespace settings_sync_util
109 109
110 } // namespace extensions 110 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698