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

Side by Side Diff: chromeos/dbus/cros_disks_client.cc

Issue 16998003: 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, 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
« no previous file with comments | « chromeos/dbus/blocking_method_caller_unittest.cc ('k') | chromeos/dbus/dbus_thread_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromeos/dbus/cros_disks_client.h" 5 #include "chromeos/dbus/cros_disks_client.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/chromeos/chromeos_version.h" 10 #include "base/chromeos/chromeos_version.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 427
428 // Already mounted path. 428 // Already mounted path.
429 if (mounted_to_source_path_map_.count(mounted_path.value()) != 0) { 429 if (mounted_to_source_path_map_.count(mounted_path.value()) != 0) {
430 FinishMount(MOUNT_ERROR_PATH_ALREADY_MOUNTED, source_path, type, 430 FinishMount(MOUNT_ERROR_PATH_ALREADY_MOUNTED, source_path, type,
431 std::string(), callback); 431 std::string(), callback);
432 return; 432 return;
433 } 433 }
434 434
435 // Perform fake mount. 435 // Perform fake mount.
436 base::PostTaskAndReplyWithResult( 436 base::PostTaskAndReplyWithResult(
437 base::WorkerPool::GetTaskRunner(true /* task_is_slow */), 437 base::WorkerPool::GetTaskRunner(true /* task_is_slow */).get(),
438 FROM_HERE, 438 FROM_HERE,
439 base::Bind(&PerformFakeMount, 439 base::Bind(&PerformFakeMount, source_path, mounted_path),
440 source_path,
441 mounted_path),
442 base::Bind(&CrosDisksClientStubImpl::ContinueMount, 440 base::Bind(&CrosDisksClientStubImpl::ContinueMount,
443 weak_ptr_factory_.GetWeakPtr(), 441 weak_ptr_factory_.GetWeakPtr(),
444 source_path, 442 source_path,
445 type, 443 type,
446 callback, 444 callback,
447 mounted_path)); 445 mounted_path));
448 } 446 }
449 447
450 virtual void Unmount(const std::string& device_path, 448 virtual void Unmount(const std::string& device_path,
451 UnmountOptions options, 449 UnmountOptions options,
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 } 760 }
763 761
764 // static 762 // static
765 base::FilePath CrosDisksClient::GetRemovableDiskMountPoint() { 763 base::FilePath CrosDisksClient::GetRemovableDiskMountPoint() {
766 return base::FilePath(base::chromeos::IsRunningOnChromeOS() ? 764 return base::FilePath(base::chromeos::IsRunningOnChromeOS() ?
767 FILE_PATH_LITERAL("/media/removable") : 765 FILE_PATH_LITERAL("/media/removable") :
768 FILE_PATH_LITERAL("/tmp/chromeos/media/removable")); 766 FILE_PATH_LITERAL("/tmp/chromeos/media/removable"));
769 } 767 }
770 768
771 } // namespace chromeos 769 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/blocking_method_caller_unittest.cc ('k') | chromeos/dbus/dbus_thread_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698