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

Side by Side Diff: chrome/browser/extensions/api/web_request/web_request_api_helpers.cc

Issue 10944013: Make original_response_headers parameter of NetworkDelegate::OnHeadersReceived const (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 years, 2 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
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 "chrome/browser/extensions/api/web_request/web_request_api_helpers.h" 5 #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 233 }
234 } 234 }
235 } 235 }
236 return result; 236 return result;
237 } 237 }
238 238
239 EventResponseDelta* CalculateOnHeadersReceivedDelta( 239 EventResponseDelta* CalculateOnHeadersReceivedDelta(
240 const std::string& extension_id, 240 const std::string& extension_id,
241 const base::Time& extension_install_time, 241 const base::Time& extension_install_time,
242 bool cancel, 242 bool cancel,
243 net::HttpResponseHeaders* old_response_headers, 243 const net::HttpResponseHeaders* old_response_headers,
244 ResponseHeaders* new_response_headers) { 244 ResponseHeaders* new_response_headers) {
245 EventResponseDelta* result = 245 EventResponseDelta* result =
246 new EventResponseDelta(extension_id, extension_install_time); 246 new EventResponseDelta(extension_id, extension_install_time);
247 result->cancel = cancel; 247 result->cancel = cancel;
248 248
249 if (!new_response_headers) 249 if (!new_response_headers)
250 return result; 250 return result;
251 251
252 // Find deleted headers (header keys are treated case insensitively). 252 // Find deleted headers (header keys are treated case insensitively).
253 { 253 {
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 void ClearCacheOnNavigation() { 1069 void ClearCacheOnNavigation() {
1070 if (content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) { 1070 if (content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
1071 ClearCacheOnNavigationOnUI(); 1071 ClearCacheOnNavigationOnUI();
1072 } else { 1072 } else {
1073 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 1073 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
1074 base::Bind(&ClearCacheOnNavigationOnUI)); 1074 base::Bind(&ClearCacheOnNavigationOnUI));
1075 } 1075 }
1076 } 1076 }
1077 1077
1078 } // namespace extension_web_request_api_helpers 1078 } // namespace extension_web_request_api_helpers
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698