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

Side by Side Diff: sync/internal_api/http_bridge.cc

Issue 379293002: Add AssertNoURLRequests() to URLRequestContext subclass destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add to two omitted subclasses of subclasses of URLRequestContext. Created 6 years, 5 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
« no previous file with comments | « net/websockets/websocket_job_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "sync/internal_api/public/http_bridge.h" 5 #include "sync/internal_api/public/http_bridge.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "net/base/load_flags.h" 10 #include "net/base/load_flags.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 http_user_agent_settings_.reset(new net::StaticHttpUserAgentSettings( 162 http_user_agent_settings_.reset(new net::StaticHttpUserAgentSettings(
163 accepted_language_list, 163 accepted_language_list,
164 user_agent)); 164 user_agent));
165 set_http_user_agent_settings(http_user_agent_settings_.get()); 165 set_http_user_agent_settings(http_user_agent_settings_.get());
166 166
167 set_net_log(baseline_context->net_log()); 167 set_net_log(baseline_context->net_log());
168 } 168 }
169 169
170 HttpBridge::RequestContext::~RequestContext() { 170 HttpBridge::RequestContext::~RequestContext() {
171 AssertNoURLRequests();
171 DCHECK(network_task_runner_->BelongsToCurrentThread()); 172 DCHECK(network_task_runner_->BelongsToCurrentThread());
172 delete http_transaction_factory(); 173 delete http_transaction_factory();
173 } 174 }
174 175
175 HttpBridge::URLFetchState::URLFetchState() : url_poster(NULL), 176 HttpBridge::URLFetchState::URLFetchState() : url_poster(NULL),
176 aborted(false), 177 aborted(false),
177 request_completed(false), 178 request_completed(false),
178 request_succeeded(false), 179 request_succeeded(false),
179 http_response_code(-1), 180 http_response_code(-1),
180 error_code(-1) {} 181 error_code(-1) {}
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 int64 sane_time_ms = 0; 397 int64 sane_time_ms = 0;
397 if (base::StringToInt64(sane_time_str, &sane_time_ms)) { 398 if (base::StringToInt64(sane_time_str, &sane_time_ms)) {
398 network_time_update_callback_.Run( 399 network_time_update_callback_.Run(
399 base::Time::FromJsTime(sane_time_ms), 400 base::Time::FromJsTime(sane_time_ms),
400 base::TimeDelta::FromMilliseconds(1), 401 base::TimeDelta::FromMilliseconds(1),
401 fetch_state_.end_time - fetch_state_.start_time); 402 fetch_state_.end_time - fetch_state_.start_time);
402 } 403 }
403 } 404 }
404 405
405 } // namespace syncer 406 } // namespace syncer
OLDNEW
« no previous file with comments | « net/websockets/websocket_job_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698