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

Side by Side Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 424083002: Split out const/non-const variants of Resource::resourceRequest(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
« no previous file with comments | « Source/core/fetch/Resource.cpp ('k') | Source/core/fetch/ResourceLoadPriorityOptimizer.cpp » ('j') | 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) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 744
745 if (!resource->hasClients()) 745 if (!resource->hasClients())
746 m_deadStatsRecorder.update(policy); 746 m_deadStatsRecorder.update(policy);
747 747
748 if (policy != Use) 748 if (policy != Use)
749 resource->setIdentifier(createUniqueIdentifier()); 749 resource->setIdentifier(createUniqueIdentifier());
750 750
751 if (!request.forPreload() || policy != Use) { 751 if (!request.forPreload() || policy != Use) {
752 ResourceLoadPriority priority = loadPriority(type, request); 752 ResourceLoadPriority priority = loadPriority(type, request);
753 if (priority != resource->resourceRequest().priority()) { 753 if (priority != resource->resourceRequest().priority()) {
754 resource->resourceRequest().setPriority(priority); 754 resource->mutableResourceRequest().setPriority(priority);
755 resource->didChangePriority(priority, 0); 755 resource->didChangePriority(priority, 0);
756 } 756 }
757 } 757 }
758 758
759 if (resourceNeedsLoad(resource.get(), request, policy)) { 759 if (resourceNeedsLoad(resource.get(), request, policy)) {
760 if (!shouldLoadNewResource(type)) { 760 if (!shouldLoadNewResource(type)) {
761 if (memoryCache()->contains(resource.get())) 761 if (memoryCache()->contains(resource.get()))
762 memoryCache()->remove(resource.get()); 762 memoryCache()->remove(resource.get());
763 return 0; 763 return 0;
764 } 764 }
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 } 1537 }
1538 } 1538 }
1539 1539
1540 void ResourceFetcher::trace(Visitor* visitor) 1540 void ResourceFetcher::trace(Visitor* visitor)
1541 { 1541 {
1542 visitor->trace(m_document); 1542 visitor->trace(m_document);
1543 ResourceLoaderHost::trace(visitor); 1543 ResourceLoaderHost::trace(visitor);
1544 } 1544 }
1545 1545
1546 } 1546 }
OLDNEW
« no previous file with comments | « Source/core/fetch/Resource.cpp ('k') | Source/core/fetch/ResourceLoadPriorityOptimizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698