Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Side by Side Diff: chrome_frame/urlmon_url_request.cc

Issue 9360014: Create a content public browser API around the ChildProcessSecurityPolicy class. The implementati... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome_frame/urlmon_url_request.h" 5 #include "chrome_frame/urlmon_url_request.h"
6 6
7 #include <urlmon.h> 7 #include <urlmon.h>
8 #include <wininet.h> 8 #include <wininet.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } 298 }
299 299
300 case BINDSTATUS_REDIRECTING: { 300 case BINDSTATUS_REDIRECTING: {
301 // If we receive a redirect for the initial pending request initiated 301 // If we receive a redirect for the initial pending request initiated
302 // when our document loads we should stash it away and inform Chrome 302 // when our document loads we should stash it away and inform Chrome
303 // accordingly when it requests data for the original URL. 303 // accordingly when it requests data for the original URL.
304 base::win::ScopedComPtr<BindContextInfo> info; 304 base::win::ScopedComPtr<BindContextInfo> info;
305 BindContextInfo::FromBindContext(bind_context_, info.Receive()); 305 BindContextInfo::FromBindContext(bind_context_, info.Receive());
306 DCHECK(info); 306 DCHECK(info);
307 GURL previously_redirected(info ? info->GetUrl() : std::wstring()); 307 GURL previously_redirected(info ? info->GetUrl() : std::wstring());
308 if (GURL(status_text) != previously_redirected) { 308 if (previously_redirected.is_valid() &&
jam 2012/02/08 18:51:12 i think this change slipped into this cl by accide
309 GURL(status_text) != previously_redirected) {
309 DVLOG(1) << __FUNCTION__ << me() << "redirect from " << url() 310 DVLOG(1) << __FUNCTION__ << me() << "redirect from " << url()
310 << " to " << status_text; 311 << " to " << status_text;
311 // Fetch the redirect status as they aren't all equal (307 in particular 312 // Fetch the redirect status as they aren't all equal (307 in particular
312 // retains the HTTP request verb). 313 // retains the HTTP request verb).
313 int http_code = GetHttpResponseStatusFromBinding(binding_); 314 int http_code = GetHttpResponseStatusFromBinding(binding_);
314 status_.SetRedirected(http_code, WideToUTF8(status_text)); 315 status_.SetRedirected(http_code, WideToUTF8(status_text));
315 // Abort. We will inform Chrome in OnStopBinding callback. 316 // Abort. We will inform Chrome in OnStopBinding callback.
316 binding_->Abort(); 317 binding_->Abort();
317 return E_ABORT; 318 return E_ABORT;
318 } 319 }
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 Stop(); 1424 Stop();
1424 } 1425 }
1425 1426
1426 void UrlmonUrlRequestManager::ResourceFetcherThread::Init() { 1427 void UrlmonUrlRequestManager::ResourceFetcherThread::Init() {
1427 CoInitialize(NULL); 1428 CoInitialize(NULL);
1428 } 1429 }
1429 1430
1430 void UrlmonUrlRequestManager::ResourceFetcherThread::CleanUp() { 1431 void UrlmonUrlRequestManager::ResourceFetcherThread::CleanUp() {
1431 CoUninitialize(); 1432 CoUninitialize();
1432 } 1433 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698