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

Side by Side Diff: chrome/browser/policy/device_management_service.cc

Issue 6402002: Simplify HttpCache/HttpNetworkLayer/HttpNetworkSession interaction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits. Created 9 years, 11 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 "chrome/browser/policy/device_management_service.h" 5 #include "chrome/browser/policy/device_management_service.h"
6 6
7 #include "chrome/browser/browser_thread.h" 7 #include "chrome/browser/browser_thread.h"
8 #include "net/base/cookie_monster.h" 8 #include "net/base/cookie_monster.h"
9 #include "net/base/host_resolver.h" 9 #include "net/base/host_resolver.h"
10 #include "net/base/load_flags.h" 10 #include "net/base/load_flags.h"
(...skipping 30 matching lines...) Expand all
41 net::URLRequestContext* base_context) { 41 net::URLRequestContext* base_context) {
42 // Share resolver, proxy service and ssl bits with the baseline context. This 42 // Share resolver, proxy service and ssl bits with the baseline context. This
43 // is important so we don't make redundant requests (e.g. when resolving proxy 43 // is important so we don't make redundant requests (e.g. when resolving proxy
44 // auto configuration). 44 // auto configuration).
45 net_log_ = base_context->net_log(); 45 net_log_ = base_context->net_log();
46 host_resolver_ = base_context->host_resolver(); 46 host_resolver_ = base_context->host_resolver();
47 proxy_service_ = base_context->proxy_service(); 47 proxy_service_ = base_context->proxy_service();
48 ssl_config_service_ = base_context->ssl_config_service(); 48 ssl_config_service_ = base_context->ssl_config_service();
49 49
50 // Share the http session. 50 // Share the http session.
51 http_transaction_factory_ = net::HttpNetworkLayer::CreateFactory( 51 http_transaction_factory_ =
52 base_context->http_transaction_factory()->GetSession()); 52 new net::HttpNetworkLayer(
53 base_context->http_transaction_factory()->GetSession());
53 54
54 // No cookies, please. 55 // No cookies, please.
55 cookie_store_ = new net::CookieMonster(NULL, NULL); 56 cookie_store_ = new net::CookieMonster(NULL, NULL);
56 57
57 // Initialize these to sane values for our purposes. 58 // Initialize these to sane values for our purposes.
58 accept_language_ = "*"; 59 accept_language_ = "*";
59 accept_charset_ = "*"; 60 accept_charset_ = "*";
60 } 61 }
61 62
62 DeviceManagementRequestContext::~DeviceManagementRequestContext() { 63 DeviceManagementRequestContext::~DeviceManagementRequestContext() {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 DeviceManagementJob* job = entry->second; 184 DeviceManagementJob* job = entry->second;
184 job->HandleResponse(status, response_code, cookies, data); 185 job->HandleResponse(status, response_code, cookies, data);
185 pending_jobs_.erase(entry); 186 pending_jobs_.erase(entry);
186 } else { 187 } else {
187 NOTREACHED() << "Callback from foreign URL fetcher"; 188 NOTREACHED() << "Callback from foreign URL fetcher";
188 } 189 }
189 delete source; 190 delete source;
190 } 191 }
191 192
192 } // namespace policy 193 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/net/connection_tester_unittest.cc ('k') | chrome/browser/sync/glue/http_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698