Mikel Astiz | 1f26c18 | 2018-08-01 05:04:29 | [diff] [blame] | 1 | // Copyright 2018 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef COMPONENTS_SYNC_DRIVER_CONFIGURE_CONTEXT_H_ |
| 6 | #define COMPONENTS_SYNC_DRIVER_CONFIGURE_CONTEXT_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
Jan Krcal | d60d6b9 | 2018-11-21 19:41:45 | [diff] [blame^] | 10 | #include "components/sync/base/storage_option.h" |
Mikel Astiz | 1f26c18 | 2018-08-01 05:04:29 | [diff] [blame] | 11 | #include "components/sync/engine/configure_reason.h" |
| 12 | |
| 13 | namespace syncer { |
| 14 | |
| 15 | // Struct describing in which context sync was enabled, including state that can |
| 16 | // be assumed to be fixed while sync is enabled (or, more precisely, is |
| 17 | // representative of the last (re)configuration request). It's built by |
| 18 | // ProfileSyncService and plumbed through DataTypeManager until datatype |
| 19 | // controllers, which for USS datatypes propagate analogous information to the |
| 20 | // processor/bridge via DataTypeActivationRequest. |
| 21 | struct ConfigureContext { |
| 22 | std::string authenticated_account_id; |
| 23 | std::string cache_guid; |
Mikel Astiz | aa2ac6cd | 2018-08-02 15:58:23 | [diff] [blame] | 24 | StorageOption storage_option = STORAGE_ON_DISK; |
Mikel Astiz | 1f26c18 | 2018-08-01 05:04:29 | [diff] [blame] | 25 | ConfigureReason reason = CONFIGURE_REASON_UNKNOWN; |
Jan Krcal | d60d6b9 | 2018-11-21 19:41:45 | [diff] [blame^] | 26 | base::Time configuration_start_time; |
Mikel Astiz | 1f26c18 | 2018-08-01 05:04:29 | [diff] [blame] | 27 | // TODO(mastiz): Consider adding |requested_types| here, but currently there |
| 28 | // are subtle differences across layers (e.g. where control types are |
| 29 | // enforced). |
| 30 | }; |
| 31 | |
| 32 | } // namespace syncer |
| 33 | |
| 34 | #endif // COMPONENTS_SYNC_DRIVER_CONFIGURE_CONTEXT_H_ |