| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/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> |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 | 840 |
| 841 // Send an update notification to all child processes. | 841 // Send an update notification to all child processes. |
| 842 listener_->NewTable(shared_memory_); | 842 listener_->NewTable(shared_memory_); |
| 843 | 843 |
| 844 WriteFullTable(); | 844 WriteFullTable(); |
| 845 } | 845 } |
| 846 } | 846 } |
| 847 table_builder_ = NULL; // Will release our reference to the builder. | 847 table_builder_ = NULL; // Will release our reference to the builder. |
| 848 | 848 |
| 849 // Notify the unit test that the rebuild is complete (will be NULL in prod.) | 849 // Notify the unit test that the rebuild is complete (will be NULL in prod.) |
| 850 if (rebuild_complete_task_.get()) { | 850 if (!rebuild_complete_task_.is_null()) { |
| 851 rebuild_complete_task_->Run(); | 851 rebuild_complete_task_.Run(); |
| 852 rebuild_complete_task_.reset(NULL); | 852 rebuild_complete_task_.Reset(); |
| 853 } | 853 } |
| 854 } | 854 } |
| 855 | 855 |
| 856 void VisitedLinkMaster::WriteToFile(FILE* file, | 856 void VisitedLinkMaster::WriteToFile(FILE* file, |
| 857 off_t offset, | 857 off_t offset, |
| 858 void* data, | 858 void* data, |
| 859 int32 data_size) { | 859 int32 data_size) { |
| 860 #ifndef NDEBUG | 860 #ifndef NDEBUG |
| 861 posted_asynchronous_operation_ = true; | 861 posted_asynchronous_operation_ = true; |
| 862 #endif | 862 #endif |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 } | 946 } |
| 947 | 947 |
| 948 void VisitedLinkMaster::TableBuilder::OnCompleteMainThread() { | 948 void VisitedLinkMaster::TableBuilder::OnCompleteMainThread() { |
| 949 if (master_) | 949 if (master_) |
| 950 master_->OnTableRebuildComplete(success_, fingerprints_); | 950 master_->OnTableRebuildComplete(success_, fingerprints_); |
| 951 | 951 |
| 952 // WILL (generally) DELETE THIS! This balances the AddRef in | 952 // WILL (generally) DELETE THIS! This balances the AddRef in |
| 953 // VisitedLinkMaster::RebuildTableFromHistory. | 953 // VisitedLinkMaster::RebuildTableFromHistory. |
| 954 Release(); | 954 Release(); |
| 955 } | 955 } |
| OLD | NEW |