OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |