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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 | 588 |
589 GURL url = job->GetURL(GetServerUrl()); | 589 GURL url = job->GetURL(GetServerUrl()); |
590 DCHECK(url.is_valid()) << "Maybe invalid --device-management-url was passed?"; | 590 DCHECK(url.is_valid()) << "Maybe invalid --device-management-url was passed?"; |
591 | 591 |
592 net::URLFetcher* fetcher = | 592 net::URLFetcher* fetcher = |
593 net::URLFetcher::Create(kURLFetcherID, std::move(url), | 593 net::URLFetcher::Create(kURLFetcherID, std::move(url), |
594 net::URLFetcher::POST, this) | 594 net::URLFetcher::POST, this) |
595 .release(); | 595 .release(); |
596 data_use_measurement::DataUseUserData::AttachToFetcher( | 596 data_use_measurement::DataUseUserData::AttachToFetcher( |
597 fetcher, data_use_measurement::DataUseUserData::POLICY); | 597 fetcher, data_use_measurement::DataUseUserData::POLICY); |
| 598 fetcher->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES | |
| 599 net::LOAD_DO_NOT_SEND_COOKIES); |
598 job->ConfigureRequest(fetcher); | 600 job->ConfigureRequest(fetcher); |
599 pending_jobs_[fetcher] = job; | 601 pending_jobs_[fetcher] = job; |
600 fetcher->Start(); | 602 fetcher->Start(); |
601 } | 603 } |
602 | 604 |
603 void DeviceManagementService::StartJobAfterDelay( | 605 void DeviceManagementService::StartJobAfterDelay( |
604 base::WeakPtr<DeviceManagementRequestJobImpl> job) { | 606 base::WeakPtr<DeviceManagementRequestJobImpl> job) { |
605 // Check if the job still exists (it is possible that it had been canceled | 607 // Check if the job still exists (it is possible that it had been canceled |
606 // while we were waiting for the retry). | 608 // while we were waiting for the retry). |
607 if (job) { | 609 if (job) { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 } | 671 } |
670 } | 672 } |
671 | 673 |
672 const JobQueue::iterator elem = | 674 const JobQueue::iterator elem = |
673 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); | 675 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); |
674 if (elem != queued_jobs_.end()) | 676 if (elem != queued_jobs_.end()) |
675 queued_jobs_.erase(elem); | 677 queued_jobs_.erase(elem); |
676 } | 678 } |
677 | 679 |
678 } // namespace policy | 680 } // namespace policy |
OLD | NEW |