| 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 "chrome/browser/policy/device_management_service.h" | 5 #include "chrome/browser/policy/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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 public: | 231 public: |
| 232 explicit DeviceManagementRequestContextGetter( | 232 explicit DeviceManagementRequestContextGetter( |
| 233 net::URLRequestContextGetter* base_context_getter) | 233 net::URLRequestContextGetter* base_context_getter) |
| 234 : base_context_getter_(base_context_getter) {} | 234 : base_context_getter_(base_context_getter) {} |
| 235 | 235 |
| 236 // Overridden from net::URLRequestContextGetter: | 236 // Overridden from net::URLRequestContextGetter: |
| 237 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; | 237 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; |
| 238 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() | 238 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() |
| 239 const OVERRIDE; | 239 const OVERRIDE; |
| 240 | 240 |
| 241 protected: |
| 242 virtual ~DeviceManagementRequestContextGetter() {} |
| 243 |
| 241 private: | 244 private: |
| 242 scoped_refptr<net::URLRequestContext> context_; | 245 scoped_refptr<net::URLRequestContext> context_; |
| 243 scoped_refptr<net::URLRequestContextGetter> base_context_getter_; | 246 scoped_refptr<net::URLRequestContextGetter> base_context_getter_; |
| 244 }; | 247 }; |
| 245 | 248 |
| 246 | 249 |
| 247 net::URLRequestContext* | 250 net::URLRequestContext* |
| 248 DeviceManagementRequestContextGetter::GetURLRequestContext() { | 251 DeviceManagementRequestContextGetter::GetURLRequestContext() { |
| 249 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 252 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 250 if (!context_) { | 253 if (!context_) { |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 } | 585 } |
| 583 } | 586 } |
| 584 | 587 |
| 585 const JobQueue::iterator elem = | 588 const JobQueue::iterator elem = |
| 586 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); | 589 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); |
| 587 if (elem != queued_jobs_.end()) | 590 if (elem != queued_jobs_.end()) |
| 588 queued_jobs_.erase(elem); | 591 queued_jobs_.erase(elem); |
| 589 } | 592 } |
| 590 | 593 |
| 591 } // namespace policy | 594 } // namespace policy |
| OLD | NEW |