| OLD | NEW |
| 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" |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 job != pending_jobs_.end(); | 448 job != pending_jobs_.end(); |
| 449 ++job) { | 449 ++job) { |
| 450 delete job->first; | 450 delete job->first; |
| 451 queued_jobs_.push_back(job->second); | 451 queued_jobs_.push_back(job->second); |
| 452 } | 452 } |
| 453 pending_jobs_.clear(); | 453 pending_jobs_.clear(); |
| 454 } | 454 } |
| 455 | 455 |
| 456 DeviceManagementService::DeviceManagementService( | 456 DeviceManagementService::DeviceManagementService( |
| 457 scoped_ptr<Configuration> configuration) | 457 scoped_ptr<Configuration> configuration) |
| 458 : configuration_(configuration.Pass()), | 458 : configuration_(std::move(configuration)), |
| 459 initialized_(false), | 459 initialized_(false), |
| 460 weak_ptr_factory_(this) { | 460 weak_ptr_factory_(this) { |
| 461 DCHECK(configuration_); | 461 DCHECK(configuration_); |
| 462 } | 462 } |
| 463 | 463 |
| 464 void DeviceManagementService::StartJob(DeviceManagementRequestJobImpl* job) { | 464 void DeviceManagementService::StartJob(DeviceManagementRequestJobImpl* job) { |
| 465 std::string server_url = GetServerUrl(); | 465 std::string server_url = GetServerUrl(); |
| 466 net::URLFetcher* fetcher = | 466 net::URLFetcher* fetcher = |
| 467 net::URLFetcher::Create(kURLFetcherID, job->GetURL(server_url), | 467 net::URLFetcher::Create(kURLFetcherID, job->GetURL(server_url), |
| 468 net::URLFetcher::POST, this).release(); | 468 net::URLFetcher::POST, this).release(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 } | 519 } |
| 520 } | 520 } |
| 521 | 521 |
| 522 const JobQueue::iterator elem = | 522 const JobQueue::iterator elem = |
| 523 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); | 523 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); |
| 524 if (elem != queued_jobs_.end()) | 524 if (elem != queued_jobs_.end()) |
| 525 queued_jobs_.erase(elem); | 525 queued_jobs_.erase(elem); |
| 526 } | 526 } |
| 527 | 527 |
| 528 } // namespace policy | 528 } // namespace policy |
| OLD | NEW |