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

Side by Side Diff: components/policy/core/common/cloud/device_management_service.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
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 "components/policy/core/common/cloud/device_management_service.h" 5 #include "components/policy/core/common/cloud/device_management_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/message_loop/message_loop_proxy.h" 12 #include "base/message_loop/message_loop_proxy.h"
13 #include "base/profiler/scoped_tracker.h"
14 #include "net/base/escape.h" 13 #include "net/base/escape.h"
15 #include "net/base/load_flags.h" 14 #include "net/base/load_flags.h"
16 #include "net/base/net_errors.h" 15 #include "net/base/net_errors.h"
17 #include "net/http/http_response_headers.h" 16 #include "net/http/http_response_headers.h"
18 #include "net/url_request/url_fetcher.h" 17 #include "net/url_request/url_fetcher.h"
19 #include "net/url_request/url_request_context_getter.h" 18 #include "net/url_request/url_request_context_getter.h"
20 #include "net/url_request/url_request_status.h" 19 #include "net/url_request/url_request_status.h"
21 #include "url/gurl.h" 20 #include "url/gurl.h"
22 21
23 namespace em = enterprise_management; 22 namespace em = enterprise_management;
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 pending_jobs_[fetcher] = job; 473 pending_jobs_[fetcher] = job;
475 fetcher->Start(); 474 fetcher->Start();
476 } 475 }
477 476
478 std::string DeviceManagementService::GetServerUrl() { 477 std::string DeviceManagementService::GetServerUrl() {
479 return configuration_->GetServerUrl(); 478 return configuration_->GetServerUrl();
480 } 479 }
481 480
482 void DeviceManagementService::OnURLFetchComplete( 481 void DeviceManagementService::OnURLFetchComplete(
483 const net::URLFetcher* source) { 482 const net::URLFetcher* source) {
484 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
485 tracked_objects::ScopedTracker tracking_profile(
486 FROM_HERE_WITH_EXPLICIT_FUNCTION(
487 "422577 DeviceManagementService::OnURLFetchComplete"));
488
489 JobFetcherMap::iterator entry(pending_jobs_.find(source)); 483 JobFetcherMap::iterator entry(pending_jobs_.find(source));
490 if (entry == pending_jobs_.end()) { 484 if (entry == pending_jobs_.end()) {
491 NOTREACHED() << "Callback from foreign URL fetcher"; 485 NOTREACHED() << "Callback from foreign URL fetcher";
492 return; 486 return;
493 } 487 }
494 488
495 DeviceManagementRequestJobImpl* job = entry->second; 489 DeviceManagementRequestJobImpl* job = entry->second;
496 pending_jobs_.erase(entry); 490 pending_jobs_.erase(entry);
497 491
498 if (job->ShouldRetry(source)) { 492 if (job->ShouldRetry(source)) {
(...skipping 27 matching lines...) Expand all
526 } 520 }
527 } 521 }
528 522
529 const JobQueue::iterator elem = 523 const JobQueue::iterator elem =
530 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); 524 std::find(queued_jobs_.begin(), queued_jobs_.end(), job);
531 if (elem != queued_jobs_.end()) 525 if (elem != queued_jobs_.end())
532 queued_jobs_.erase(elem); 526 queued_jobs_.erase(elem);
533 } 527 }
534 528
535 } // namespace policy 529 } // namespace policy
OLDNEW
« no previous file with comments | « components/invalidation/gcm_network_channel.cc ('k') | components/translate/core/browser/translate_language_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698