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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2936723002: Report frequency of single page app navigations to UMA (Closed)
Patch Set: Created 3 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Mutates the policy for POST requests to avoid form resubmission. 115 // Mutates the policy for POST requests to avoid form resubmission.
116 return method == RequestMethod::kIsPost 116 return method == RequestMethod::kIsPost
117 ? WebCachePolicy::kReturnCacheDataDontLoad 117 ? WebCachePolicy::kReturnCacheDataDontLoad
118 : WebCachePolicy::kReturnCacheDataElseLoad; 118 : WebCachePolicy::kReturnCacheDataElseLoad;
119 case kFrameLoadTypeReload: 119 case kFrameLoadTypeReload:
120 return resource_type == ResourceType::kIsMainResource 120 return resource_type == ResourceType::kIsMainResource
121 ? WebCachePolicy::kValidatingCacheData 121 ? WebCachePolicy::kValidatingCacheData
122 : WebCachePolicy::kUseProtocolCachePolicy; 122 : WebCachePolicy::kUseProtocolCachePolicy;
123 case kFrameLoadTypeReloadBypassingCache: 123 case kFrameLoadTypeReloadBypassingCache:
124 return WebCachePolicy::kBypassingCache; 124 return WebCachePolicy::kBypassingCache;
125 case kFrameLoadTypeCount: {
126 }
125 } 127 }
126 NOTREACHED(); 128 NOTREACHED();
127 return WebCachePolicy::kUseProtocolCachePolicy; 129 return WebCachePolicy::kUseProtocolCachePolicy;
128 } 130 }
129 131
130 // Determines WebCachePolicy for |frame|. This WebCachePolicy should be a base 132 // Determines WebCachePolicy for |frame|. This WebCachePolicy should be a base
131 // policy to consider one of each resource belonging to the frame, and should 133 // policy to consider one of each resource belonging to the frame, and should
132 // not count resource specific conditions in. 134 // not count resource specific conditions in.
133 // TODO(toyoshim): Remove |resourceType| to realize the design described above. 135 // TODO(toyoshim): Remove |resourceType| to realize the design described above.
134 // See also comments in resourceRequestCachePolicy(). 136 // See also comments in resourceRequestCachePolicy().
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 document_ = nullptr; 854 document_ = nullptr;
853 } 855 }
854 856
855 DEFINE_TRACE(FrameFetchContext) { 857 DEFINE_TRACE(FrameFetchContext) {
856 visitor->Trace(document_loader_); 858 visitor->Trace(document_loader_);
857 visitor->Trace(document_); 859 visitor->Trace(document_);
858 BaseFetchContext::Trace(visitor); 860 BaseFetchContext::Trace(visitor);
859 } 861 }
860 862
861 } // namespace blink 863 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698