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" |
Tanmoy Mollik | 4940767 | 2019-07-30 15:23:16 | [diff] [blame] | 12 | #include "google_apis/gaia/core_account_id.h" |
Mikel Astiz | 1f26c18 | 2018-08-01 05:04:29 | [diff] [blame] | 13 | |
| 14 | namespace syncer { |
| 15 | |
| 16 | // Struct describing in which context sync was enabled, including state that can |
| 17 | // be assumed to be fixed while sync is enabled (or, more precisely, is |
| 18 | // representative of the last (re)configuration request). It's built by |
| 19 | // ProfileSyncService and plumbed through DataTypeManager until datatype |
| 20 | // controllers, which for USS datatypes propagate analogous information to the |
| 21 | // processor/bridge via DataTypeActivationRequest. |
| 22 | struct ConfigureContext { |
Tanmoy Mollik | 4940767 | 2019-07-30 15:23:16 | [diff] [blame] | 23 | CoreAccountId authenticated_account_id; |
Mikel Astiz | 1f26c18 | 2018-08-01 05:04:29 | [diff] [blame] | 24 | std::string cache_guid; |
Mikel Astiz | aa2ac6cd | 2018-08-02 15:58:23 | [diff] [blame] | 25 | StorageOption storage_option = STORAGE_ON_DISK; |
Mikel Astiz | 1f26c18 | 2018-08-01 05:04:29 | [diff] [blame] | 26 | ConfigureReason reason = CONFIGURE_REASON_UNKNOWN; |
Jan Krcal | d60d6b9 | 2018-11-21 19:41:45 | [diff] [blame] | 27 | base::Time configuration_start_time; |
Mikel Astiz | 1f26c18 | 2018-08-01 05:04:29 | [diff] [blame] | 28 | // TODO(mastiz): Consider adding |requested_types| here, but currently there |
| 29 | // are subtle differences across layers (e.g. where control types are |
| 30 | // enforced). |
| 31 | }; |
| 32 | |
| 33 | } // namespace syncer |
| 34 | |
| 35 | #endif // COMPONENTS_SYNC_DRIVER_CONFIGURE_CONTEXT_H_ |