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

Side by Side Diff: components/storage_monitor/storage_monitor_chromeos.cc

Issue 1043013002: favor DCHECK_CURRENTLY_ON for better logs in components/ (part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master + add one more Created 5 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/storage_monitor/storage_monitor_chromeos.h" 5 #include "components/storage_monitor/storage_monitor_chromeos.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 device_label, 72 device_label,
73 base::UTF8ToUTF16(disk->vendor_name()), 73 base::UTF8ToUTF16(disk->vendor_name()),
74 base::UTF8ToUTF16(disk->product_name()), 74 base::UTF8ToUTF16(disk->product_name()),
75 disk->total_size_in_bytes()); 75 disk->total_size_in_bytes());
76 return true; 76 return true;
77 } 77 }
78 78
79 // Returns whether the mount point in |mount_info| is a media device or not. 79 // Returns whether the mount point in |mount_info| is a media device or not.
80 bool CheckMountedPathOnFileThread( 80 bool CheckMountedPathOnFileThread(
81 const DiskMountManager::MountPointInfo& mount_info) { 81 const DiskMountManager::MountPointInfo& mount_info) {
82 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); 82 DCHECK_CURRENTLY_ON(BrowserThread::FILE);
Cait (Slow) 2015/04/23 00:02:37 content::BrowserThread::FILE?
Mostyn Bramley-Moore 2015/04/23 07:43:16 The other DCHECK_CURRENTLY_ON's in this file don't
Mostyn Bramley-Moore 2015/04/23 08:15:09 Looks like it is needed after all- fixed in the la
83 return MediaStorageUtil::HasDcim(base::FilePath(mount_info.mount_path)); 83 return MediaStorageUtil::HasDcim(base::FilePath(mount_info.mount_path));
84 } 84 }
85 85
86 } // namespace 86 } // namespace
87 87
88 using content::BrowserThread; 88 using content::BrowserThread;
89 89
90 StorageMonitorCros::StorageMonitorCros() 90 StorageMonitorCros::StorageMonitorCros()
91 : weak_ptr_factory_(this) { 91 : weak_ptr_factory_(this) {
92 } 92 }
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 mount_map_.insert(std::make_pair(mount_info.mount_path, info)); 297 mount_map_.insert(std::make_pair(mount_info.mount_path, info));
298 298
299 receiver()->ProcessAttach(info); 299 receiver()->ProcessAttach(info);
300 } 300 }
301 301
302 StorageMonitor* StorageMonitor::CreateInternal() { 302 StorageMonitor* StorageMonitor::CreateInternal() {
303 return new StorageMonitorCros(); 303 return new StorageMonitorCros();
304 } 304 }
305 305
306 } // namespace storage_monitor 306 } // namespace storage_monitor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698