diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-19 04:11:57 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-19 04:11:57 +0000 |
commit | 3189013eebc55ea5493186b29f2cee2bc7c0dafc (patch) | |
tree | f9c867f92c5fd9325a7d7e6ea9fed638103c4f4b /chrome/browser/visitedlink/visitedlink_master.h | |
parent | 1946e0c4351fbdfd5b012d3c2aeac2c9218ad027 (diff) | |
download | chromium_src-3189013eebc55ea5493186b29f2cee2bc7c0dafc.zip chromium_src-3189013eebc55ea5493186b29f2cee2bc7c0dafc.tar.gz chromium_src-3189013eebc55ea5493186b29f2cee2bc7c0dafc.tar.bz2 |
Hook up the SequencedWorkerPool to the browser thread.
[re-land of 116816 http://codereview.chromium.org/9065009]
This does some refactoring of the static data in the browser thread so we only have one global object instead of a bunch fo separate arrays.
It also hooks up the visited link master's I/O to use this new system as a proof of concept.
Review URL: https://chromiumcodereview.appspot.com/9124033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118236 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/visitedlink/visitedlink_master.h')
-rw-r--r-- | chrome/browser/visitedlink/visitedlink_master.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/visitedlink/visitedlink_master.h b/chrome/browser/visitedlink/visitedlink_master.h index c84e809..1771afe 100644 --- a/chrome/browser/visitedlink/visitedlink_master.h +++ b/chrome/browser/visitedlink/visitedlink_master.h @@ -17,6 +17,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/ref_counted.h" #include "base/shared_memory.h" +#include "base/threading/sequenced_worker_pool.h" #include "chrome/browser/history/history.h" #include "chrome/common/visitedlink_common.h" @@ -163,6 +164,10 @@ class VisitedLinkMaster : public VisitedLinkCommon { // File I/O functions // ------------------ + // Posts the given task to the blocking worker pool with our options. + void PostIOTask(const tracked_objects::Location& from_here, + const base::Closure& task); + // Writes the entire table to disk, returning true on success. It will leave // the table file open and the handle to it in file_ bool WriteFullTable(); @@ -312,6 +317,9 @@ class VisitedLinkMaster : public VisitedLinkCommon { // (it knows the path to where the data is stored) Profile* profile_; + // Lazily initialized sequence token for posting file tasks. + base::SequencedWorkerPool::SequenceToken sequence_token_; + // When non-NULL, indicates we are in database rebuild mode and points to // the class collecting fingerprint information from the history system. // The pointer is owned by this class, but it must remain valid while the |