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

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

Issue 701463004: Removing instrumentations for task URLFetcherCore::OnCompletedURLRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more removal. Created 6 years, 1 month 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 | « google_apis/gaia/oauth2_api_call_flow.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/profiler/scoped_tracker.h"
9 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
10 #include "net/base/load_flags.h" 9 #include "net/base/load_flags.h"
11 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
12 #include "net/cookies/cookie_monster.h" 11 #include "net/cookies/cookie_monster.h"
13 #include "net/http/http_cache.h" 12 #include "net/http/http_cache.h"
14 #include "net/http/http_network_layer.h" 13 #include "net/http/http_network_layer.h"
15 #include "net/http/http_response_headers.h" 14 #include "net/http/http_response_headers.h"
16 #include "net/url_request/static_http_user_agent_settings.h" 15 #include "net/url_request/static_http_user_agent_settings.h"
17 #include "net/url_request/url_fetcher.h" 16 #include "net/url_request/url_fetcher.h"
18 #include "net/url_request/url_request_context.h" 17 #include "net/url_request/url_request_context.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 fetch_state_.error_code = net::ERR_ABORTED; 337 fetch_state_.error_code = net::ERR_ABORTED;
339 http_post_completed_.Signal(); 338 http_post_completed_.Signal();
340 } 339 }
341 340
342 void HttpBridge::DestroyURLFetcherOnIOThread(net::URLFetcher* fetcher) { 341 void HttpBridge::DestroyURLFetcherOnIOThread(net::URLFetcher* fetcher) {
343 DCHECK(network_task_runner_->BelongsToCurrentThread()); 342 DCHECK(network_task_runner_->BelongsToCurrentThread());
344 delete fetcher; 343 delete fetcher;
345 } 344 }
346 345
347 void HttpBridge::OnURLFetchComplete(const net::URLFetcher* source) { 346 void HttpBridge::OnURLFetchComplete(const net::URLFetcher* source) {
348 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
349 tracked_objects::ScopedTracker tracking_profile(
350 FROM_HERE_WITH_EXPLICIT_FUNCTION(
351 "422577 HttpBridge::OnURLFetchComplete"));
352
353 DCHECK(network_task_runner_->BelongsToCurrentThread()); 347 DCHECK(network_task_runner_->BelongsToCurrentThread());
354 base::AutoLock lock(fetch_state_lock_); 348 base::AutoLock lock(fetch_state_lock_);
355 if (fetch_state_.aborted) 349 if (fetch_state_.aborted)
356 return; 350 return;
357 351
358 fetch_state_.end_time = base::Time::Now(); 352 fetch_state_.end_time = base::Time::Now();
359 fetch_state_.request_completed = true; 353 fetch_state_.request_completed = true;
360 fetch_state_.request_succeeded = 354 fetch_state_.request_succeeded =
361 (net::URLRequestStatus::SUCCESS == source->GetStatus().status()); 355 (net::URLRequestStatus::SUCCESS == source->GetStatus().status());
362 fetch_state_.http_response_code = source->GetResponseCode(); 356 fetch_state_.http_response_code = source->GetResponseCode();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 int64 sane_time_ms = 0; 395 int64 sane_time_ms = 0;
402 if (base::StringToInt64(sane_time_str, &sane_time_ms)) { 396 if (base::StringToInt64(sane_time_str, &sane_time_ms)) {
403 network_time_update_callback_.Run( 397 network_time_update_callback_.Run(
404 base::Time::FromJsTime(sane_time_ms), 398 base::Time::FromJsTime(sane_time_ms),
405 base::TimeDelta::FromMilliseconds(1), 399 base::TimeDelta::FromMilliseconds(1),
406 fetch_state_.end_time - fetch_state_.start_time); 400 fetch_state_.end_time - fetch_state_.start_time);
407 } 401 }
408 } 402 }
409 403
410 } // namespace syncer 404 } // namespace syncer
OLDNEW
« no previous file with comments | « google_apis/gaia/oauth2_api_call_flow.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698