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

Side by Side Diff: components/policy/core/common/cloud/device_management_service.cc

Issue 686963002: Switching profiler instrumentations from ScopedProfile to ScopedTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_profile.h" 13 #include "base/profiler/scoped_tracker.h"
14 #include "net/base/escape.h" 14 #include "net/base/escape.h"
15 #include "net/base/load_flags.h" 15 #include "net/base/load_flags.h"
16 #include "net/base/net_errors.h" 16 #include "net/base/net_errors.h"
17 #include "net/http/http_response_headers.h" 17 #include "net/http/http_response_headers.h"
18 #include "net/url_request/url_fetcher.h" 18 #include "net/url_request/url_fetcher.h"
19 #include "net/url_request/url_request_context_getter.h" 19 #include "net/url_request/url_request_context_getter.h"
20 #include "net/url_request/url_request_status.h" 20 #include "net/url_request/url_request_status.h"
21 #include "url/gurl.h" 21 #include "url/gurl.h"
22 22
23 namespace em = enterprise_management; 23 namespace em = enterprise_management;
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 pending_jobs_[fetcher] = job; 474 pending_jobs_[fetcher] = job;
475 fetcher->Start(); 475 fetcher->Start();
476 } 476 }
477 477
478 std::string DeviceManagementService::GetServerUrl() { 478 std::string DeviceManagementService::GetServerUrl() {
479 return configuration_->GetServerUrl(); 479 return configuration_->GetServerUrl();
480 } 480 }
481 481
482 void DeviceManagementService::OnURLFetchComplete( 482 void DeviceManagementService::OnURLFetchComplete(
483 const net::URLFetcher* source) { 483 const net::URLFetcher* source) {
484 // TODO(vadimt): Remove ScopedProfile below once crbug.com/422577 is fixed. 484 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
485 tracked_objects::ScopedProfile tracking_profile( 485 tracked_objects::ScopedTracker tracking_profile(
486 FROM_HERE_WITH_EXPLICIT_FUNCTION( 486 FROM_HERE_WITH_EXPLICIT_FUNCTION(
487 "422577 DeviceManagementService::OnURLFetchComplete")); 487 "422577 DeviceManagementService::OnURLFetchComplete"));
488 488
489 JobFetcherMap::iterator entry(pending_jobs_.find(source)); 489 JobFetcherMap::iterator entry(pending_jobs_.find(source));
490 if (entry == pending_jobs_.end()) { 490 if (entry == pending_jobs_.end()) {
491 NOTREACHED() << "Callback from foreign URL fetcher"; 491 NOTREACHED() << "Callback from foreign URL fetcher";
492 return; 492 return;
493 } 493 }
494 494
495 DeviceManagementRequestJobImpl* job = entry->second; 495 DeviceManagementRequestJobImpl* job = entry->second;
(...skipping 30 matching lines...) Expand all
526 } 526 }
527 } 527 }
528 528
529 const JobQueue::iterator elem = 529 const JobQueue::iterator elem =
530 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); 530 std::find(queued_jobs_.begin(), queued_jobs_.end(), job);
531 if (elem != queued_jobs_.end()) 531 if (elem != queued_jobs_.end())
532 queued_jobs_.erase(elem); 532 queued_jobs_.erase(elem);
533 } 533 }
534 534
535 } // namespace policy 535 } // namespace policy
OLDNEW
« no previous file with comments | « components/invalidation/gcm_network_channel.cc ('k') | components/policy/core/common/policy_loader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698