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

Side by Side Diff: chrome/browser/extensions/api/storage/setting_sync_data.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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
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/api/storage/setting_sync_data.h" 5 #include "chrome/browser/extensions/api/storage/setting_sync_data.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
11 #include "sync/api/sync_data.h" 11 #include "components/sync/api/sync_data.h"
12 #include "sync/protocol/app_setting_specifics.pb.h" 12 #include "components/sync/protocol/app_setting_specifics.pb.h"
13 #include "sync/protocol/extension_setting_specifics.pb.h" 13 #include "components/sync/protocol/extension_setting_specifics.pb.h"
14 #include "sync/protocol/sync.pb.h" 14 #include "components/sync/protocol/sync.pb.h"
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 SettingSyncData::SettingSyncData(const syncer::SyncChange& sync_change) 18 SettingSyncData::SettingSyncData(const syncer::SyncChange& sync_change)
19 : change_type_(sync_change.change_type()) { 19 : change_type_(sync_change.change_type()) {
20 ExtractSyncData(sync_change.sync_data()); 20 ExtractSyncData(sync_change.sync_data());
21 } 21 }
22 22
23 SettingSyncData::SettingSyncData(const syncer::SyncData& sync_data) 23 SettingSyncData::SettingSyncData(const syncer::SyncData& sync_data)
24 : change_type_(syncer::SyncChange::ACTION_INVALID) { 24 : change_type_(syncer::SyncChange::ACTION_INVALID) {
(...skipping 30 matching lines...) Expand all
55 value_ = base::JSONReader::Read(extension_specifics.value()); 55 value_ = base::JSONReader::Read(extension_specifics.value());
56 56
57 if (!value_) { 57 if (!value_) {
58 LOG(WARNING) << "Specifics for " << extension_id_ << "/" << key_ 58 LOG(WARNING) << "Specifics for " << extension_id_ << "/" << key_
59 << " had bad JSON for value: " << extension_specifics.value(); 59 << " had bad JSON for value: " << extension_specifics.value();
60 value_.reset(new base::DictionaryValue()); 60 value_.reset(new base::DictionaryValue());
61 } 61 }
62 } 62 }
63 63
64 } // namespace extensions 64 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/storage/setting_sync_data.h ('k') | chrome/browser/extensions/api/storage/settings_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698