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

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

Issue 102103002: Have HashMap<KeyType, AtomicString>::get() return a const reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use AtomicString::ConstructFromLiteral Created 7 years 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 | « Source/core/fetch/CrossOriginAccessControl.cpp ('k') | Source/core/html/HTMLElement.h » ('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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 { 735 {
736 ASSERT(resource); 736 ASSERT(resource);
737 ASSERT(resource->inCache()); 737 ASSERT(resource->inCache());
738 ASSERT(resource->isLoaded()); 738 ASSERT(resource->isLoaded());
739 ASSERT(resource->canUseCacheValidator()); 739 ASSERT(resource->canUseCacheValidator());
740 ASSERT(!resource->resourceToRevalidate()); 740 ASSERT(!resource->resourceToRevalidate());
741 741
742 ResourceRequest revalidatingRequest(resource->resourceRequest()); 742 ResourceRequest revalidatingRequest(resource->resourceRequest());
743 addAdditionalRequestHeaders(revalidatingRequest, resource->type()); 743 addAdditionalRequestHeaders(revalidatingRequest, resource->type());
744 744
745 const String& lastModified = resource->response().httpHeaderField("Last-Modi fied"); 745 const AtomicString& lastModified = resource->response().httpHeaderField("Las t-Modified");
746 const String& eTag = resource->response().httpHeaderField("ETag"); 746 const AtomicString& eTag = resource->response().httpHeaderField("ETag");
747 if (!lastModified.isEmpty() || !eTag.isEmpty()) { 747 if (!lastModified.isEmpty() || !eTag.isEmpty()) {
748 ASSERT(context().cachePolicy(resource->type()) != CachePolicyReload); 748 ASSERT(context().cachePolicy(resource->type()) != CachePolicyReload);
749 if (context().cachePolicy(resource->type()) == CachePolicyRevalidate) 749 if (context().cachePolicy(resource->type()) == CachePolicyRevalidate)
750 revalidatingRequest.setHTTPHeaderField("Cache-Control", "max-age=0") ; 750 revalidatingRequest.setHTTPHeaderField("Cache-Control", "max-age=0") ;
751 if (!lastModified.isEmpty()) 751 if (!lastModified.isEmpty())
752 revalidatingRequest.setHTTPHeaderField("If-Modified-Since", lastModi fied); 752 revalidatingRequest.setHTTPHeaderField("If-Modified-Since", lastModi fied);
753 if (!eTag.isEmpty()) 753 if (!eTag.isEmpty())
754 revalidatingRequest.setHTTPHeaderField("If-None-Match", eTag); 754 revalidatingRequest.setHTTPHeaderField("If-None-Match", eTag);
755 } 755 }
756 756
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 } 1333 }
1334 #endif 1334 #endif
1335 1335
1336 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() 1336 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions()
1337 { 1337 {
1338 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, DocumentC ontext)); 1338 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, DocumentC ontext));
1339 return options; 1339 return options;
1340 } 1340 }
1341 1341
1342 } 1342 }
OLDNEW
« no previous file with comments | « Source/core/fetch/CrossOriginAccessControl.cpp ('k') | Source/core/html/HTMLElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698