blob: 22df758af4a0f9bfc6285a21ef89710a404aedc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/drive/fake_free_disk_space_getter.h"
#include "components/drive/drive_test_util.h"
namespace drive {
FakeFreeDiskSpaceGetter::FakeFreeDiskSpaceGetter()
: default_value_(test_util::kLotsOfSpace) {
}
FakeFreeDiskSpaceGetter::~FakeFreeDiskSpaceGetter() {
}
void FakeFreeDiskSpaceGetter::PushFakeValue(int64 value) {
fake_values_.push_back(value);
}
int64 FakeFreeDiskSpaceGetter::AmountOfFreeDiskSpace() {
if (fake_values_.empty())
return default_value_;
const int64 value = fake_values_.front();
fake_values_.pop_front();
return value;
}
} // namespace drive
|