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

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

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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/cloud/device_management_service.h" 5 #include "chrome/browser/policy/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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 base::MessageLoop::current()->PostDelayedTask( 560 base::MessageLoop::current()->PostDelayedTask(
561 FROM_HERE, 561 FROM_HERE,
562 base::Bind(&DeviceManagementService::Initialize, 562 base::Bind(&DeviceManagementService::Initialize,
563 weak_ptr_factory_.GetWeakPtr()), 563 weak_ptr_factory_.GetWeakPtr()),
564 base::TimeDelta::FromMilliseconds(delay_milliseconds)); 564 base::TimeDelta::FromMilliseconds(delay_milliseconds));
565 } 565 }
566 566
567 void DeviceManagementService::Initialize() { 567 void DeviceManagementService::Initialize() {
568 if (initialized_) 568 if (initialized_)
569 return; 569 return;
570 DCHECK(!request_context_getter_); 570 DCHECK(!request_context_getter_.get());
571 request_context_getter_ = new DeviceManagementRequestContextGetter( 571 request_context_getter_ = new DeviceManagementRequestContextGetter(
572 g_browser_process->system_request_context()); 572 g_browser_process->system_request_context());
573 initialized_ = true; 573 initialized_ = true;
574 574
575 while (!queued_jobs_.empty()) { 575 while (!queued_jobs_.empty()) {
576 StartJob(queued_jobs_.front()); 576 StartJob(queued_jobs_.front());
577 queued_jobs_.pop_front(); 577 queued_jobs_.pop_front();
578 } 578 }
579 } 579 }
580 580
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 } 646 }
647 } 647 }
648 648
649 const JobQueue::iterator elem = 649 const JobQueue::iterator elem =
650 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); 650 std::find(queued_jobs_.begin(), queued_jobs_.end(), job);
651 if (elem != queued_jobs_.end()) 651 if (elem != queued_jobs_.end())
652 queued_jobs_.erase(elem); 652 queued_jobs_.erase(elem);
653 } 653 }
654 654
655 } // namespace policy 655 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698