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

Side by Side Diff: Source/WebCore/loader/MainResourceLoader.cpp

Issue 6711029: Merge 80043 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 9 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
« no previous file with comments | « LayoutTests/platform/chromium/test_expectations.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // FIXME: More that is in common with SubresourceLoader should move up into Reso urceLoader. 52 // FIXME: More that is in common with SubresourceLoader should move up into Reso urceLoader.
53 53
54 namespace WebCore { 54 namespace WebCore {
55 55
56 MainResourceLoader::MainResourceLoader(Frame* frame) 56 MainResourceLoader::MainResourceLoader(Frame* frame)
57 : ResourceLoader(frame, true, true) 57 : ResourceLoader(frame, true, true)
58 , m_dataLoadTimer(this, &MainResourceLoader::handleDataLoadNow) 58 , m_dataLoadTimer(this, &MainResourceLoader::handleDataLoadNow)
59 , m_loadingMultipartContent(false) 59 , m_loadingMultipartContent(false)
60 , m_waitingForContentPolicy(false) 60 , m_waitingForContentPolicy(false)
61 , m_timeOfLastDataReceived(0.0)
61 { 62 {
62 } 63 }
63 64
64 MainResourceLoader::~MainResourceLoader() 65 MainResourceLoader::~MainResourceLoader()
65 { 66 {
66 } 67 }
67 68
68 PassRefPtr<MainResourceLoader> MainResourceLoader::create(Frame* frame) 69 PassRefPtr<MainResourceLoader> MainResourceLoader::create(Frame* frame)
69 { 70 {
70 return adoptRef(new MainResourceLoader(frame)); 71 return adoptRef(new MainResourceLoader(frame));
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 453
453 // The additional processing can do anything including possibly removing the last 454 // The additional processing can do anything including possibly removing the last
454 // reference to this object. 455 // reference to this object.
455 RefPtr<MainResourceLoader> protect(this); 456 RefPtr<MainResourceLoader> protect(this);
456 457
457 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 458 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
458 RefPtr<DocumentLoader> dl = documentLoader(); 459 RefPtr<DocumentLoader> dl = documentLoader();
459 #endif 460 #endif
460 461
461 ASSERT(!documentLoader()->timing()->responseEnd); 462 ASSERT(!documentLoader()->timing()->responseEnd);
462 documentLoader()->timing()->responseEnd = finishTime ? finishTime : m_timeOf LastDataReceived; 463 documentLoader()->timing()->responseEnd = finishTime ? finishTime : (m_timeO fLastDataReceived ? m_timeOfLastDataReceived : currentTime());
463 frameLoader()->finishedLoading(); 464 frameLoader()->finishedLoading();
464 ResourceLoader::didFinishLoading(finishTime); 465 ResourceLoader::didFinishLoading(finishTime);
465 466
466 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 467 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
467 dl->applicationCacheHost()->finishedLoadingMainResource(); 468 dl->applicationCacheHost()->finishedLoadingMainResource();
468 #endif 469 #endif
469 } 470 }
470 471
471 void MainResourceLoader::didFail(const ResourceError& error) 472 void MainResourceLoader::didFail(const ResourceError& error)
472 { 473 {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 startDataLoadTimer(); 616 startDataLoadTimer();
616 else { 617 else {
617 ResourceRequest r(m_initialRequest); 618 ResourceRequest r(m_initialRequest);
618 m_initialRequest = ResourceRequest(); 619 m_initialRequest = ResourceRequest();
619 loadNow(r); 620 loadNow(r);
620 } 621 }
621 } 622 }
622 } 623 }
623 624
624 } 625 }
OLDNEW
« no previous file with comments | « LayoutTests/platform/chromium/test_expectations.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698