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

Side by Side Diff: content/browser/appcache/chrome_appcache_service.cc

Issue 9572001: Do cookie checks in NetworkDelegate instead of the URLRequest::Delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fix Created 8 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/appcache/chrome_appcache_service.h" 5 #include "content/browser/appcache/chrome_appcache_service.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "content/public/browser/content_browser_client.h" 9 #include "content/public/browser/content_browser_client.h"
10 #include "content/public/browser/resource_context.h" 10 #include "content/public/browser/resource_context.h"
11 #include "content/public/common/content_url_request_user_data.h"
11 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
13 #include "net/url_request/url_request.h"
12 #include "webkit/quota/quota_manager.h" 14 #include "webkit/quota/quota_manager.h"
13 15
14 using content::BrowserThread; 16 using content::BrowserThread;
15 17
16 ChromeAppCacheService::ChromeAppCacheService( 18 ChromeAppCacheService::ChromeAppCacheService(
17 quota::QuotaManagerProxy* quota_manager_proxy) 19 quota::QuotaManagerProxy* quota_manager_proxy)
18 : AppCacheService(quota_manager_proxy), 20 : AppCacheService(quota_manager_proxy),
19 resource_context_(NULL) { 21 resource_context_(NULL) {
20 } 22 }
21 23
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 return content::GetContentClient()->browser()->AllowAppCache( 60 return content::GetContentClient()->browser()->AllowAppCache(
59 manifest_url, first_party, resource_context_); 61 manifest_url, first_party, resource_context_);
60 } 62 }
61 63
62 bool ChromeAppCacheService::CanCreateAppCache( 64 bool ChromeAppCacheService::CanCreateAppCache(
63 const GURL& manifest_url, const GURL& first_party) { 65 const GURL& manifest_url, const GURL& first_party) {
64 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 66 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
65 return content::GetContentClient()->browser()->AllowAppCache( 67 return content::GetContentClient()->browser()->AllowAppCache(
66 manifest_url, first_party, resource_context_); 68 manifest_url, first_party, resource_context_);
67 } 69 }
70
71 void ChromeAppCacheService::InitializeUpdateRequest(net::URLRequest* request) {
72 // TODO(jochen): Do cookie audit.
73 request->SetUserData(
74 content::ContentURLRequestUserData::kUserDataKey,
75 new content::ContentURLRequestUserData());
76 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698