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

Side by Side Diff: components/history/core/browser/history_backend.cc

Issue 2850633004: [USS] implement CreateMetadataChangeList and GetClientTag (Closed)
Patch Set: comments Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/history/core/browser/typed_url_sync_bridge.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/history/core/browser/history_backend.h" 5 #include "components/history/core/browser/history_backend.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // HistoryBackend is created on the UI thread by HistoryService, then the 212 // HistoryBackend is created on the UI thread by HistoryService, then the
213 // HistoryBackend::Init() method is called on the DB thread. Create the 213 // HistoryBackend::Init() method is called on the DB thread. Create the
214 // base::SupportsUserData on the DB thread since it is not thread-safe. 214 // base::SupportsUserData on the DB thread since it is not thread-safe.
215 supports_user_data_helper_.reset(new HistoryBackendHelper); 215 supports_user_data_helper_.reset(new HistoryBackendHelper);
216 216
217 if (!force_fail) 217 if (!force_fail)
218 InitImpl(history_database_params); 218 InitImpl(history_database_params);
219 delegate_->DBLoaded(); 219 delegate_->DBLoaded();
220 if (base::FeatureList::IsEnabled(switches::kSyncUSSTypedURL)) { 220 if (base::FeatureList::IsEnabled(switches::kSyncUSSTypedURL)) {
221 typed_url_sync_bridge_ = base::MakeUnique<TypedURLSyncBridge>( 221 typed_url_sync_bridge_ = base::MakeUnique<TypedURLSyncBridge>(
222 this, 222 this, db_.get(),
223 base::BindRepeating( 223 base::BindRepeating(
224 &ModelTypeChangeProcessor::Create, 224 &ModelTypeChangeProcessor::Create,
225 // TODO(gangwu): use ReportUnrecoverableError before launch. 225 // TODO(gangwu): use ReportUnrecoverableError before launch.
226 base::BindRepeating(base::IgnoreResult(&DumpWithoutCrashing)))); 226 base::BindRepeating(base::IgnoreResult(&DumpWithoutCrashing))));
227 } else { 227 } else {
228 typed_url_syncable_service_ = 228 typed_url_syncable_service_ =
229 base::MakeUnique<TypedUrlSyncableService>(this); 229 base::MakeUnique<TypedUrlSyncableService>(this);
230 } 230 }
231 231
232 memory_pressure_listener_.reset(new base::MemoryPressureListener( 232 memory_pressure_listener_.reset(new base::MemoryPressureListener(
(...skipping 2402 matching lines...) Expand 10 before | Expand all | Expand 10 after
2635 // transaction is currently open. 2635 // transaction is currently open.
2636 db_->CommitTransaction(); 2636 db_->CommitTransaction();
2637 db_->Vacuum(); 2637 db_->Vacuum();
2638 db_->BeginTransaction(); 2638 db_->BeginTransaction();
2639 db_->GetStartDate(&first_recorded_time_); 2639 db_->GetStartDate(&first_recorded_time_);
2640 2640
2641 return true; 2641 return true;
2642 } 2642 }
2643 2643
2644 } // namespace history 2644 } // namespace history
OLDNEW
« no previous file with comments | « no previous file | components/history/core/browser/typed_url_sync_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698