| Index: chrome/browser/visitedlink_master.cc
|
| diff --git a/chrome/browser/visitedlink_master.cc b/chrome/browser/visitedlink_master.cc
|
| index cf1445c5e2fb1db67058316ca89100646dd8b619..02b45d971afacb0b56309ab4872e825765c44c8d 100644
|
| --- a/chrome/browser/visitedlink_master.cc
|
| +++ b/chrome/browser/visitedlink_master.cc
|
| @@ -21,6 +21,7 @@
|
| #include "base/rand_util.h"
|
| #include "base/stack_container.h"
|
| #include "base/string_util.h"
|
| +#include "base/thread_restrictions.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/browser_thread.h"
|
| #include "chrome/browser/history/history.h"
|
| @@ -251,6 +252,10 @@ void VisitedLinkMaster::InitMembers(Listener* listener, Profile* profile) {
|
| }
|
|
|
| bool VisitedLinkMaster::Init() {
|
| + // We probably shouldn't be loading this from the UI thread,
|
| + // but it does need to happen early on in startup.
|
| + // http://code.google.com/p/chromium/issues/detail?id=24163
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| if (!InitFromFile())
|
| return InitFromScratch(suppress_rebuild_);
|
| return true;
|
| @@ -889,6 +894,9 @@ void VisitedLinkMaster::OnTableRebuildComplete(
|
| // Send an update notification to all child processes.
|
| listener_->NewTable(shared_memory_);
|
|
|
| + // We shouldn't be writing the table from the main thread!
|
| + // http://code.google.com/p/chromium/issues/detail?id=24163
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| WriteFullTable();
|
| }
|
| }
|
|
|