| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/visitedlink_master.h" | 5 #include "chrome/browser/visitedlink_master.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <io.h> | 9 #include <io.h> |
| 10 #include <shlobj.h> | 10 #include <shlobj.h> |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 posted_asynchronous_operation_ = false; | 251 posted_asynchronous_operation_ = false; |
| 252 #endif | 252 #endif |
| 253 } | 253 } |
| 254 | 254 |
| 255 bool VisitedLinkMaster::Init() { | 255 bool VisitedLinkMaster::Init() { |
| 256 if (!InitFromFile()) | 256 if (!InitFromFile()) |
| 257 return InitFromScratch(suppress_rebuild_); | 257 return InitFromScratch(suppress_rebuild_); |
| 258 return true; | 258 return true; |
| 259 } | 259 } |
| 260 | 260 |
| 261 bool VisitedLinkMaster::ShareToProcess(base::ProcessHandle process, | |
| 262 base::SharedMemoryHandle *new_handle) { | |
| 263 if (shared_memory_) | |
| 264 return shared_memory_->ShareToProcess(process, new_handle); | |
| 265 | |
| 266 NOTREACHED(); | |
| 267 return false; | |
| 268 } | |
| 269 | |
| 270 base::SharedMemoryHandle VisitedLinkMaster::GetSharedMemoryHandle() { | |
| 271 return shared_memory_->handle(); | |
| 272 } | |
| 273 | |
| 274 VisitedLinkMaster::Hash VisitedLinkMaster::TryToAddURL(const GURL& url) { | 261 VisitedLinkMaster::Hash VisitedLinkMaster::TryToAddURL(const GURL& url) { |
| 275 // Extra check that we are not off the record. This should not happen. | 262 // Extra check that we are not off the record. This should not happen. |
| 276 if (profile_ && profile_->IsOffTheRecord()) { | 263 if (profile_ && profile_->IsOffTheRecord()) { |
| 277 NOTREACHED(); | 264 NOTREACHED(); |
| 278 return null_hash_; | 265 return null_hash_; |
| 279 } | 266 } |
| 280 | 267 |
| 281 if (!url.is_valid()) | 268 if (!url.is_valid()) |
| 282 return null_hash_; // Don't add invalid URLs. | 269 return null_hash_; // Don't add invalid URLs. |
| 283 | 270 |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 } | 994 } |
| 1008 | 995 |
| 1009 void VisitedLinkMaster::TableBuilder::OnCompleteMainThread() { | 996 void VisitedLinkMaster::TableBuilder::OnCompleteMainThread() { |
| 1010 if (master_) | 997 if (master_) |
| 1011 master_->OnTableRebuildComplete(success_, fingerprints_); | 998 master_->OnTableRebuildComplete(success_, fingerprints_); |
| 1012 | 999 |
| 1013 // WILL (generally) DELETE THIS! This balances the AddRef in | 1000 // WILL (generally) DELETE THIS! This balances the AddRef in |
| 1014 // VisitedLinkMaster::RebuildTableFromHistory. | 1001 // VisitedLinkMaster::RebuildTableFromHistory. |
| 1015 Release(); | 1002 Release(); |
| 1016 } | 1003 } |
| OLD | NEW |