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

Side by Side Diff: net/http/http_cache_transaction.cc

Issue 2710113002: DO NOT SUBMIT really old prototype of sprite recognition for image replacement
Patch Set: Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSImageSetValue.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 // 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 "net/http/http_cache_transaction.h" 5 #include "net/http/http_cache_transaction.h"
6 6
7 #include "build/build_config.h" // For OS_POSIX 7 #include "build/build_config.h" // For OS_POSIX
8 8
9 #if defined(OS_POSIX) 9 #if defined(OS_POSIX)
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 1973
1974 if (request_->method == "DELETE") 1974 if (request_->method == "DELETE")
1975 return false; 1975 return false;
1976 1976
1977 return true; 1977 return true;
1978 } 1978 }
1979 1979
1980 int HttpCache::Transaction::BeginCacheRead() { 1980 int HttpCache::Transaction::BeginCacheRead() {
1981 // We don't support any combination of LOAD_ONLY_FROM_CACHE and byte ranges. 1981 // We don't support any combination of LOAD_ONLY_FROM_CACHE and byte ranges.
1982 if (response_.headers->response_code() == 206 || partial_) { 1982 if (response_.headers->response_code() == 206 || partial_) {
1983 NOTREACHED();
1984 return ERR_CACHE_MISS; 1983 return ERR_CACHE_MISS;
1985 } 1984 }
1986 1985
1987 if (request_->method == "HEAD") 1986 if (request_->method == "HEAD")
1988 FixHeadersForHead(); 1987 FixHeadersForHead();
1989 1988
1990 // We don't have the whole resource. 1989 // We don't have the whole resource.
1991 if (truncated_) 1990 if (truncated_)
1992 return ERR_CACHE_MISS; 1991 return ERR_CACHE_MISS;
1993 1992
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
2939 default: 2938 default:
2940 NOTREACHED(); 2939 NOTREACHED();
2941 } 2940 }
2942 } 2941 }
2943 2942
2944 void HttpCache::Transaction::OnIOComplete(int result) { 2943 void HttpCache::Transaction::OnIOComplete(int result) {
2945 DoLoop(result); 2944 DoLoop(result);
2946 } 2945 }
2947 2946
2948 } // namespace net 2947 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSImageSetValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698