| 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/extension_sync_data.h" | 5 #include "chrome/browser/extensions/extension_sync_data.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/sync/protocol/app_specifics.pb.h" | 9 #include "sync/protocol/app_specifics.pb.h" |
| 10 #include "chrome/browser/sync/protocol/extension_specifics.pb.h" | 10 #include "sync/protocol/extension_specifics.pb.h" |
| 11 #include "chrome/browser/sync/protocol/sync.pb.h" | 11 #include "sync/protocol/sync.pb.h" |
| 12 | 12 |
| 13 ExtensionSyncData::ExtensionSyncData() | 13 ExtensionSyncData::ExtensionSyncData() |
| 14 : uninstalled_(false), | 14 : uninstalled_(false), |
| 15 enabled_(false), | 15 enabled_(false), |
| 16 incognito_enabled_(false), | 16 incognito_enabled_(false), |
| 17 type_(Extension::SYNC_TYPE_NONE), | 17 type_(Extension::SYNC_TYPE_NONE), |
| 18 notifications_disabled_(false) { | 18 notifications_disabled_(false) { |
| 19 } | 19 } |
| 20 | 20 |
| 21 ExtensionSyncData::ExtensionSyncData(const SyncData& sync_data) | 21 ExtensionSyncData::ExtensionSyncData(const SyncData& sync_data) |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 if (entity_specifics.has_extension()) { | 159 if (entity_specifics.has_extension()) { |
| 160 PopulateFromExtensionSpecifics(entity_specifics.extension()); | 160 PopulateFromExtensionSpecifics(entity_specifics.extension()); |
| 161 type_ = Extension::SYNC_TYPE_EXTENSION; | 161 type_ = Extension::SYNC_TYPE_EXTENSION; |
| 162 } else if (entity_specifics.has_app()) { | 162 } else if (entity_specifics.has_app()) { |
| 163 PopulateFromAppSpecifics(entity_specifics.app()); | 163 PopulateFromAppSpecifics(entity_specifics.app()); |
| 164 type_ = Extension::SYNC_TYPE_APP; | 164 type_ = Extension::SYNC_TYPE_APP; |
| 165 } else { | 165 } else { |
| 166 LOG(FATAL) << "Attempt to sync bad EntitySpecifics."; | 166 LOG(FATAL) << "Attempt to sync bad EntitySpecifics."; |
| 167 } | 167 } |
| 168 } | 168 } |
| OLD | NEW |