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

Unified Diff: chromeos/dbus/fake_cros_disks_client.h

Issue 676423004: Merge CrosDisksClientStubImpl into FakeCrosDisksClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove static Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/cros_disks_client.cc ('k') | chromeos/dbus/fake_cros_disks_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_cros_disks_client.h
diff --git a/chromeos/dbus/fake_cros_disks_client.h b/chromeos/dbus/fake_cros_disks_client.h
index 500aa07d8a71effc7c7c52264fad4c25243b8526..30e8c97c810479d7e7a7c088ed315f8238585880 100644
--- a/chromeos/dbus/fake_cros_disks_client.h
+++ b/chromeos/dbus/fake_cros_disks_client.h
@@ -5,27 +5,34 @@
#ifndef CHROMEOS_DBUS_FAKE_CROS_DISKS_CLIENT_H_
#define CHROMEOS_DBUS_FAKE_CROS_DISKS_CLIENT_H_
+#include <set>
#include <string>
#include "base/callback.h"
+#include "base/files/file_path.h"
#include "chromeos/dbus/cros_disks_client.h"
namespace chromeos {
// A fake implementation of CrosDiskeClient. This class provides a fake behavior
// and the user of this class can raise a fake mouse events.
-class FakeCrosDisksClient : public CrosDisksClient {
+class CHROMEOS_EXPORT FakeCrosDisksClient : public CrosDisksClient {
public:
FakeCrosDisksClient();
virtual ~FakeCrosDisksClient();
// CrosDisksClient overrides
virtual void Init(dbus::Bus* bus) override;
+
+ // Performs fake mounting for archive files. Instead of actually extracting
+ // contents of archive files, this function creates a directory that
+ // contains a dummy file.
virtual void Mount(const std::string& source_path,
const std::string& source_format,
const std::string& mount_label,
const base::Closure& callback,
const base::Closure& error_callback) override;
+ // Deletes the directory created in Mount().
virtual void Unmount(const std::string& device_path,
UnmountOptions options,
const base::Closure& callback,
@@ -122,6 +129,7 @@ class FakeCrosDisksClient : public CrosDisksClient {
std::string last_format_device_path_;
std::string last_format_filesystem_;
bool format_success_;
+ std::set<base::FilePath> mounted_paths_;
};
} // namespace chromeos
« no previous file with comments | « chromeos/dbus/cros_disks_client.cc ('k') | chromeos/dbus/fake_cros_disks_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698