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

Side by Side Diff: chrome/browser/chromeos/camera_detector.cc

Issue 18308004: Update CrOS 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, 5 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/chromeos/camera_detector.h" 5 #include "chrome/browser/chromeos/camera_detector.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_enumerator.h" 9 #include "base/files/file_enumerator.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 30 matching lines...) Expand all
41 41
42 // static 42 // static
43 void CameraDetector::StartPresenceCheck(const base::Closure& callback) { 43 void CameraDetector::StartPresenceCheck(const base::Closure& callback) {
44 DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 44 DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI));
45 if (presence_check_in_progress_) 45 if (presence_check_in_progress_)
46 return; 46 return;
47 DVLOG(1) << "Starting camera presence check"; 47 DVLOG(1) << "Starting camera presence check";
48 presence_check_in_progress_ = true; 48 presence_check_in_progress_ = true;
49 base::PostTaskAndReplyWithResult( 49 base::PostTaskAndReplyWithResult(
50 BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior( 50 BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
51 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN), 51 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN).get(),
52 FROM_HERE, 52 FROM_HERE,
53 base::Bind(&CameraDetector::CheckPresence), 53 base::Bind(&CameraDetector::CheckPresence),
54 base::Bind(&CameraDetector::OnPresenceCheckDone, callback)); 54 base::Bind(&CameraDetector::OnPresenceCheckDone, callback));
55 } 55 }
56 56
57 // static 57 // static
58 void CameraDetector::OnPresenceCheckDone(const base::Closure& callback, 58 void CameraDetector::OnPresenceCheckDone(const base::Closure& callback,
59 bool present) { 59 bool present) {
60 DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 60 DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI));
61 camera_presence_ = present ? kCameraPresent : kCameraAbsent; 61 camera_presence_ = present ? kCameraPresent : kCameraAbsent;
(...skipping 17 matching lines...) Expand all
79 base::SplitString(v4l_capabilities, kV4LCapabilitiesDelim, &caps); 79 base::SplitString(v4l_capabilities, kV4LCapabilitiesDelim, &caps);
80 if (find(caps.begin(), caps.end(), kV4LCaptureCapability) != caps.end()) { 80 if (find(caps.begin(), caps.end(), kV4LCaptureCapability) != caps.end()) {
81 return true; 81 return true;
82 } 82 }
83 } 83 }
84 } 84 }
85 return false; 85 return false;
86 } 86 }
87 87
88 } // namespace chromeos 88 } // namespace chromeos
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_tiling_client.h ('k') | chrome/browser/chromeos/drive/change_list_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698