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

Side by Side Diff: components/precache/content/precache_manager.cc

Issue 2551023006: [Sync] SyncEngine 1.5: Fix all backend references in PSS. (Closed)
Patch Set: Created 4 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/precache/content/precache_manager.h" 5 #include "components/precache/content/precache_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 base::StartsWith( 92 base::StartsWith(
93 base::FieldTrialList::FindFullName(kPrecacheFieldTrialName), 93 base::FieldTrialList::FindFullName(kPrecacheFieldTrialName),
94 kPrecacheFieldTrialControlGroup, base::CompareCase::SENSITIVE); 94 kPrecacheFieldTrialControlGroup, base::CompareCase::SENSITIVE);
95 } 95 }
96 96
97 bool PrecacheManager::IsPrecachingAllowed() const { 97 bool PrecacheManager::IsPrecachingAllowed() const {
98 return PrecachingAllowed() == AllowedType::ALLOWED; 98 return PrecachingAllowed() == AllowedType::ALLOWED;
99 } 99 }
100 100
101 PrecacheManager::AllowedType PrecacheManager::PrecachingAllowed() const { 101 PrecacheManager::AllowedType PrecacheManager::PrecachingAllowed() const {
102 if (!(sync_service_ && sync_service_->IsBackendInitialized())) 102 if (!(sync_service_ && sync_service_->IsEngineInitialized()))
103 return AllowedType::PENDING; 103 return AllowedType::PENDING;
104 104
105 // SyncService delegates to SyncPrefs, which must be called on the UI thread. 105 // SyncService delegates to SyncPrefs, which must be called on the UI thread.
106 if (history_service_ && 106 if (history_service_ &&
107 sync_service_->GetActiveDataTypes().Has(syncer::SESSIONS) && 107 sync_service_->GetActiveDataTypes().Has(syncer::SESSIONS) &&
108 !sync_service_->GetEncryptedDataTypes().Has(syncer::SESSIONS)) 108 !sync_service_->GetEncryptedDataTypes().Has(syncer::SESSIONS))
109 return AllowedType::ALLOWED; 109 return AllowedType::ALLOWED;
110 110
111 return AllowedType::DISALLOWED; 111 return AllowedType::DISALLOWED;
112 } 112 }
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 this)); 355 this));
356 precache_fetcher_->Start(); 356 precache_fetcher_->Start();
357 } 357 }
358 358
359 void PrecacheManager::OnHostsReceivedThenDone( 359 void PrecacheManager::OnHostsReceivedThenDone(
360 const history::TopHostsList& host_counts) { 360 const history::TopHostsList& host_counts) {
361 OnDone(); 361 OnDone();
362 } 362 }
363 363
364 } // namespace precache 364 } // namespace precache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698