| OLD | NEW |
| 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/visitedlink/browser/visitedlink_master.h" | 5 #include "components/visitedlink/browser/visitedlink_master.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 } | 275 } |
| 276 } | 276 } |
| 277 | 277 |
| 278 void VisitedLinkMaster::InitMembers() { | 278 void VisitedLinkMaster::InitMembers() { |
| 279 file_ = NULL; | 279 file_ = NULL; |
| 280 shared_memory_ = NULL; | 280 shared_memory_ = NULL; |
| 281 shared_memory_serial_ = 0; | 281 shared_memory_serial_ = 0; |
| 282 used_items_ = 0; | 282 used_items_ = 0; |
| 283 table_size_override_ = 0; | 283 table_size_override_ = 0; |
| 284 suppress_rebuild_ = false; | 284 suppress_rebuild_ = false; |
| 285 sequence_token_ = BrowserThread::GetBlockingPool()->GetSequenceToken(); | 285 sequence_token_ = base::SequencedWorkerPool::GetSequenceToken(); |
| 286 } | 286 } |
| 287 | 287 |
| 288 bool VisitedLinkMaster::Init() { | 288 bool VisitedLinkMaster::Init() { |
| 289 // Create the temporary table. If the table is rebuilt that temporary table | 289 // Create the temporary table. If the table is rebuilt that temporary table |
| 290 // will be became the main table. | 290 // will be became the main table. |
| 291 // The salt must be generated before the table so that it can be copied to | 291 // The salt must be generated before the table so that it can be copied to |
| 292 // the shared memory. | 292 // the shared memory. |
| 293 GenerateSalt(salt_); | 293 GenerateSalt(salt_); |
| 294 if (!CreateURLTable(DefaultTableSize())) | 294 if (!CreateURLTable(DefaultTableSize())) |
| 295 return false; | 295 return false; |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 BrowserThread::UI, FROM_HERE, | 1195 BrowserThread::UI, FROM_HERE, |
| 1196 base::Bind(&TableBuilder::OnCompleteMainThread, this)); | 1196 base::Bind(&TableBuilder::OnCompleteMainThread, this)); |
| 1197 } | 1197 } |
| 1198 | 1198 |
| 1199 void VisitedLinkMaster::TableBuilder::OnCompleteMainThread() { | 1199 void VisitedLinkMaster::TableBuilder::OnCompleteMainThread() { |
| 1200 if (master_) | 1200 if (master_) |
| 1201 master_->OnTableRebuildComplete(success_, fingerprints_); | 1201 master_->OnTableRebuildComplete(success_, fingerprints_); |
| 1202 } | 1202 } |
| 1203 | 1203 |
| 1204 } // namespace visitedlink | 1204 } // namespace visitedlink |
| OLD | NEW |