summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 01:19:30 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 01:19:30 +0000
commit0f8805d56674fff8ef79abd0981a3ede8b79190d (patch)
tree69c4dca6c214320eb45135b0e3b10d00d082113d
parent0c34137ded36b4519c8f793386e7115a55e209bf (diff)
downloadchromium_src-0f8805d56674fff8ef79abd0981a3ede8b79190d.zip
chromium_src-0f8805d56674fff8ef79abd0981a3ede8b79190d.tar.gz
chromium_src-0f8805d56674fff8ef79abd0981a3ede8b79190d.tar.bz2
Fix assert in PageCycler tests.
Review URL: http://codereview.chromium.org/4559001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65166 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/views/external_protocol_dialog.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/views/external_protocol_dialog.cc b/chrome/browser/views/external_protocol_dialog.cc
index 3022c28..5b6d975 100644
--- a/chrome/browser/views/external_protocol_dialog.cc
+++ b/chrome/browser/views/external_protocol_dialog.cc
@@ -9,6 +9,7 @@
#include "base/metrics/histogram.h"
#include "base/string_util.h"
#include "base/thread.h"
+#include "base/thread_restrictions.h"
#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
#include "chrome/browser/browser_process.h"
@@ -157,6 +158,10 @@ ExternalProtocolDialog::ExternalProtocolDialog(TabContents* tab_contents,
// static
std::wstring ExternalProtocolDialog::GetApplicationForProtocol(
const GURL& url) {
+ // We shouldn't be accessing the registry from the UI thread, since it can go
+ // to disk. http://crbug.com/61996
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+
std::wstring url_spec = ASCIIToWide(url.possibly_invalid_spec());
std::wstring cmd_key_path =
ASCIIToWide(url.scheme() + "\\shell\\open\\command");