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

Side by Side Diff: chrome/browser/policy/device_management_service.cc

Issue 9066005: Remove all old-style DeviceManagementService legacy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase. Created 8 years, 11 months 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 | Annotate | Revision Log
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 "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"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/message_loop_proxy.h" 12 #include "base/message_loop_proxy.h"
13 #include "base/stringprintf.h" 13 #include "base/stringprintf.h"
14 #include "base/sys_info.h" 14 #include "base/sys_info.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/net/chrome_net_log.h" 16 #include "chrome/browser/net/chrome_net_log.h"
17 #include "chrome/browser/policy/device_management_backend.h"
18 #include "chrome/browser/policy/device_management_backend_impl.h"
19 #include "chrome/common/chrome_version_info.h" 17 #include "chrome/common/chrome_version_info.h"
20 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
21 #include "content/public/common/content_client.h" 19 #include "content/public/common/content_client.h"
22 #include "content/public/common/url_fetcher.h" 20 #include "content/public/common/url_fetcher.h"
23 #include "googleurl/src/gurl.h" 21 #include "googleurl/src/gurl.h"
24 #include "net/base/cookie_monster.h" 22 #include "net/base/cookie_monster.h"
25 #include "net/base/escape.h" 23 #include "net/base/escape.h"
26 #include "net/base/host_resolver.h" 24 #include "net/base/host_resolver.h"
27 #include "net/base/load_flags.h" 25 #include "net/base/load_flags.h"
28 #include "net/base/net_errors.h" 26 #include "net/base/net_errors.h"
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 const std::string& value) { 452 const std::string& value) {
455 query_params_.push_back(std::make_pair(name, value)); 453 query_params_.push_back(std::make_pair(name, value));
456 } 454 }
457 455
458 DeviceManagementService::~DeviceManagementService() { 456 DeviceManagementService::~DeviceManagementService() {
459 // All running jobs should have been cancelled by now. 457 // All running jobs should have been cancelled by now.
460 DCHECK(pending_jobs_.empty()); 458 DCHECK(pending_jobs_.empty());
461 DCHECK(queued_jobs_.empty()); 459 DCHECK(queued_jobs_.empty());
462 } 460 }
463 461
464 DeviceManagementBackend* DeviceManagementService::CreateBackend() {
465 return new DeviceManagementBackendImpl(this);
466 }
467
468 DeviceManagementRequestJob* DeviceManagementService::CreateJob( 462 DeviceManagementRequestJob* DeviceManagementService::CreateJob(
469 DeviceManagementRequestJob::JobType type) { 463 DeviceManagementRequestJob::JobType type) {
470 return new DeviceManagementRequestJobImpl(type, this); 464 return new DeviceManagementRequestJobImpl(type, this);
471 } 465 }
472 466
473 void DeviceManagementService::ScheduleInitialization(int64 delay_milliseconds) { 467 void DeviceManagementService::ScheduleInitialization(int64 delay_milliseconds) {
474 if (initialized_) 468 if (initialized_)
475 return; 469 return;
476 MessageLoop::current()->PostDelayedTask( 470 MessageLoop::current()->PostDelayedTask(
477 FROM_HERE, 471 FROM_HERE,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 } 581 }
588 } 582 }
589 583
590 const JobQueue::iterator elem = 584 const JobQueue::iterator elem =
591 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); 585 std::find(queued_jobs_.begin(), queued_jobs_.end(), job);
592 if (elem != queued_jobs_.end()) 586 if (elem != queued_jobs_.end())
593 queued_jobs_.erase(elem); 587 queued_jobs_.erase(elem);
594 } 588 }
595 589
596 } // namespace policy 590 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_management_service.h ('k') | chrome/browser/policy/mock_device_management_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698