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 #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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 TableBuilder(VisitedLinkMaster* master, | 142 TableBuilder(VisitedLinkMaster* master, |
143 const uint8 salt[LINK_SALT_LENGTH]); | 143 const uint8 salt[LINK_SALT_LENGTH]); |
144 | 144 |
145 // Called on the main thread when the master is being destroyed. This will | 145 // Called on the main thread when the master is being destroyed. This will |
146 // prevent a crash when the query completes and the master is no longer | 146 // prevent a crash when the query completes and the master is no longer |
147 // around. We can not actually do anything but mark this fact, since the | 147 // around. We can not actually do anything but mark this fact, since the |
148 // table will be being rebuilt simultaneously on the other thread. | 148 // table will be being rebuilt simultaneously on the other thread. |
149 void DisownMaster(); | 149 void DisownMaster(); |
150 | 150 |
151 // VisitedLinkDelegate::URLEnumerator | 151 // VisitedLinkDelegate::URLEnumerator |
152 virtual void OnURL(const GURL& url) OVERRIDE; | 152 virtual void OnURL(const GURL& url) override; |
153 virtual void OnComplete(bool succeed) OVERRIDE; | 153 virtual void OnComplete(bool succeed) override; |
154 | 154 |
155 private: | 155 private: |
156 virtual ~TableBuilder() {} | 156 virtual ~TableBuilder() {} |
157 | 157 |
158 // OnComplete mashals to this function on the main thread to do the | 158 // OnComplete mashals to this function on the main thread to do the |
159 // notification. | 159 // notification. |
160 void OnCompleteMainThread(); | 160 void OnCompleteMainThread(); |
161 | 161 |
162 // Owner of this object. MAY ONLY BE ACCESSED ON THE MAIN THREAD! | 162 // Owner of this object. MAY ONLY BE ACCESSED ON THE MAIN THREAD! |
163 VisitedLinkMaster* master_; | 163 VisitedLinkMaster* master_; |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 BrowserThread::UI, FROM_HERE, | 982 BrowserThread::UI, FROM_HERE, |
983 base::Bind(&TableBuilder::OnCompleteMainThread, this)); | 983 base::Bind(&TableBuilder::OnCompleteMainThread, this)); |
984 } | 984 } |
985 | 985 |
986 void VisitedLinkMaster::TableBuilder::OnCompleteMainThread() { | 986 void VisitedLinkMaster::TableBuilder::OnCompleteMainThread() { |
987 if (master_) | 987 if (master_) |
988 master_->OnTableRebuildComplete(success_, fingerprints_); | 988 master_->OnTableRebuildComplete(success_, fingerprints_); |
989 } | 989 } |
990 | 990 |
991 } // namespace visitedlink | 991 } // namespace visitedlink |
OLD | NEW |