OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/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> |
11 #endif // defined(OS_WIN) | 11 #endif // defined(OS_WIN) |
12 #include <stdio.h> | 12 #include <stdio.h> |
13 | 13 |
14 #include <algorithm> | 14 #include <algorithm> |
15 | 15 |
16 #include "base/file_util.h" | 16 #include "base/file_util.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/message_loop.h" | 18 #include "base/message_loop.h" |
19 #include "base/path_service.h" | 19 #include "base/path_service.h" |
20 #include "base/process_util.h" | 20 #include "base/process_util.h" |
21 #include "base/rand_util.h" | 21 #include "base/rand_util.h" |
22 #include "base/stack_container.h" | 22 #include "base/stack_container.h" |
23 #include "base/string_util.h" | 23 #include "base/string_util.h" |
24 #include "base/thread_restrictions.h" | 24 #include "base/thread_restrictions.h" |
25 #include "chrome/browser/browser_process.h" | 25 #include "chrome/browser/browser_process.h" |
26 #include "chrome/browser/browser_thread.h" | 26 #include "chrome/browser/browser_thread.h" |
27 #include "chrome/browser/history/history.h" | 27 #include "chrome/browser/history/history.h" |
28 #include "chrome/browser/profile.h" | 28 #include "chrome/browser/profiles/profile.h" |
29 | 29 |
30 using file_util::ScopedFILE; | 30 using file_util::ScopedFILE; |
31 using file_util::OpenFile; | 31 using file_util::OpenFile; |
32 using file_util::TruncateFile; | 32 using file_util::TruncateFile; |
33 | 33 |
34 const int32 VisitedLinkMaster::kFileHeaderSignatureOffset = 0; | 34 const int32 VisitedLinkMaster::kFileHeaderSignatureOffset = 0; |
35 const int32 VisitedLinkMaster::kFileHeaderVersionOffset = 4; | 35 const int32 VisitedLinkMaster::kFileHeaderVersionOffset = 4; |
36 const int32 VisitedLinkMaster::kFileHeaderLengthOffset = 8; | 36 const int32 VisitedLinkMaster::kFileHeaderLengthOffset = 8; |
37 const int32 VisitedLinkMaster::kFileHeaderUsedOffset = 12; | 37 const int32 VisitedLinkMaster::kFileHeaderUsedOffset = 12; |
38 const int32 VisitedLinkMaster::kFileHeaderSaltOffset = 16; | 38 const int32 VisitedLinkMaster::kFileHeaderSaltOffset = 16; |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 } | 993 } |
994 | 994 |
995 void VisitedLinkMaster::TableBuilder::OnCompleteMainThread() { | 995 void VisitedLinkMaster::TableBuilder::OnCompleteMainThread() { |
996 if (master_) | 996 if (master_) |
997 master_->OnTableRebuildComplete(success_, fingerprints_); | 997 master_->OnTableRebuildComplete(success_, fingerprints_); |
998 | 998 |
999 // WILL (generally) DELETE THIS! This balances the AddRef in | 999 // WILL (generally) DELETE THIS! This balances the AddRef in |
1000 // VisitedLinkMaster::RebuildTableFromHistory. | 1000 // VisitedLinkMaster::RebuildTableFromHistory. |
1001 Release(); | 1001 Release(); |
1002 } | 1002 } |
OLD | NEW |