summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 16:26:20 +0000
committerstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 16:26:20 +0000
commit402cfefb2da2e34d41f6ec5b84cf3b4dbfbfc9c7 (patch)
treea6176b80dd2839686e89f5e589a3d24886f17227
parent0a163e8a168750c9f314267bbad4514139fecce4 (diff)
downloadchromium_src-402cfefb2da2e34d41f6ec5b84cf3b4dbfbfc9c7.zip
chromium_src-402cfefb2da2e34d41f6ec5b84cf3b4dbfbfc9c7.tar.gz
chromium_src-402cfefb2da2e34d41f6ec5b84cf3b4dbfbfc9c7.tar.bz2
Handle cookie requests in BackgroundThread.
Enable the unload event test. BUG=40814 TEST=unload event test Review URL: http://codereview.chromium.org/1629027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45042 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome_frame/test/test_mock_with_web_server.cc2
-rw-r--r--chrome_frame/urlmon_url_request.cc4
-rw-r--r--chrome_frame/urlmon_url_request.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/chrome_frame/test/test_mock_with_web_server.cc b/chrome_frame/test/test_mock_with_web_server.cc
index 543ba22..b68f481 100644
--- a/chrome_frame/test/test_mock_with_web_server.cc
+++ b/chrome_frame/test/test_mock_with_web_server.cc
@@ -856,7 +856,7 @@ const wchar_t kBeforeUnloadTest[] =
const wchar_t kBeforeUnloadMain[] =
L"http://localhost:1337/files/fulltab_before_unload_event_main.html";
-TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_UnloadEventTest) {
+TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_UnloadEventTest) {
CloseIeAtEndOfScope last_resort_close_ie;
chrome_frame_test::TimedMsgLoop loop;
ComStackObjectWithUninitialize<MockWebBrowserEventSink> mock;
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc
index 3c38b0c..b1d082f 100644
--- a/chrome_frame/urlmon_url_request.cc
+++ b/chrome_frame/urlmon_url_request.cc
@@ -924,7 +924,7 @@ net::Error UrlmonUrlRequest::HresultToNetError(HRESULT hr) {
PluginUrlRequestManager::ThreadSafeFlags
UrlmonUrlRequestManager::GetThreadSafeFlags() {
- return PluginUrlRequestManager::NOT_THREADSAFE;
+ return PluginUrlRequestManager::COOKIE_REQUEST_THREADSAFE;
}
void UrlmonUrlRequestManager::SetInfoForUrl(const std::wstring& url,
@@ -1180,6 +1180,8 @@ UrlmonUrlRequestManager::~UrlmonUrlRequestManager() {
void UrlmonUrlRequestManager::AddPrivacyDataForUrl(
const std::string& url, const std::string& policy_ref,
int32 flags) {
+ AutoLock lock(privacy_info_lock_);
+
bool fire_privacy_event = false;
if (privacy_info_.privacy_records.size() == 0)
diff --git a/chrome_frame/urlmon_url_request.h b/chrome_frame/urlmon_url_request.h
index 5dbb417..9ace8dc 100644
--- a/chrome_frame/urlmon_url_request.h
+++ b/chrome_frame/urlmon_url_request.h
@@ -52,6 +52,7 @@ class UrlmonUrlRequestManager
// Returns a copy of the url privacy information for this instance.
PrivacyInfo privacy_info() {
+ AutoLock lock(privacy_info_lock_);
return privacy_info_;
}
@@ -109,6 +110,7 @@ class UrlmonUrlRequestManager
bool stopping_;
int calling_delegate_; // re-entrancy protection (debug only check)
+ Lock privacy_info_lock_;
PrivacyInfo privacy_info_;
// The window to be used to fire notifications on.
HWND notification_window_;