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

Unified Diff: components/sync/driver/sync_service_base.cc

Issue 2732333003: [Sync] ModelTypeStore factory shouldn't require valid PSS to function correctly (Closed)
Patch Set: Address comments Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/driver/sync_service_base.h ('k') | components/sync/model/model_type_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/sync_service_base.cc
diff --git a/components/sync/driver/sync_service_base.cc b/components/sync/driver/sync_service_base.cc
index 8da8c4b6893c34ca262781acf62c4834ac00e8c4..39e252c8fb91cc3cc71f1b6d8339f8b3d699c621 100644
--- a/components/sync/driver/sync_service_base.cc
+++ b/components/sync/driver/sync_service_base.cc
@@ -26,6 +26,9 @@ namespace {
const base::FilePath::CharType kSyncDataFolderName[] =
FILE_PATH_LITERAL("Sync Data");
+const base::FilePath::CharType kLevelDBFolderName[] =
+ FILE_PATH_LITERAL("LevelDB");
+
EngineComponentsFactory::Switches EngineSwitchesFromCommandLine() {
EngineComponentsFactory::Switches factory_switches = {
EngineComponentsFactory::ENCRYPTION_KEYSTORE,
@@ -58,8 +61,6 @@ SyncServiceBase::SyncServiceBase(std::unique_ptr<SyncClient> sync_client,
signin_(std::move(signin)),
channel_(channel),
base_directory_(base_directory),
- sync_data_folder_(
- base_directory_.Append(base::FilePath(kSyncDataFolderName))),
debug_identifier_(debug_identifier),
sync_prefs_(sync_client_->GetPrefService()) {
ResetCryptoState();
@@ -77,6 +78,19 @@ void SyncServiceBase::RemoveObserver(SyncServiceObserver* observer) {
observers_.RemoveObserver(observer);
}
+// static
+base::FilePath SyncServiceBase::FormatSyncDataPath(
+ const base::FilePath& base_directory) {
+ return base_directory.Append(base::FilePath(kSyncDataFolderName));
+}
+
+// static
+base::FilePath SyncServiceBase::FormatSharedModelTypeStorePath(
+ const base::FilePath& base_directory) {
+ return FormatSyncDataPath(base_directory)
+ .Append(base::FilePath(kLevelDBFolderName));
+}
+
bool SyncServiceBase::HasObserver(const SyncServiceObserver* observer) const {
DCHECK(thread_checker_.CalledOnValidThread());
return observers_.HasObserver(observer);
« no previous file with comments | « components/sync/driver/sync_service_base.h ('k') | components/sync/model/model_type_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698