Add remoting and PPAPI tests to GN build
[chromium-blink-merge.git] / content / browser / fileapi / mock_file_change_observer.cc
blobf6a86e964a016a4fed76022f73b9a723c0546b5b
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
3 // found in the LICENSE file.
5 #include "content/browser/fileapi/mock_file_change_observer.h"
7 namespace storage {
9 MockFileChangeObserver::MockFileChangeObserver()
10 : create_file_count_(0),
11 create_file_from_count_(0),
12 remove_file_count_(0),
13 modify_file_count_(0),
14 create_directory_count_(0),
15 remove_directory_count_(0) {}
17 MockFileChangeObserver::~MockFileChangeObserver() {}
19 // static
20 ChangeObserverList MockFileChangeObserver::CreateList(
21 MockFileChangeObserver* observer) {
22 ChangeObserverList list;
23 return list.AddObserver(observer, base::MessageLoopProxy::current().get());
26 void MockFileChangeObserver::OnCreateFile(const FileSystemURL& url) {
27 create_file_count_++;
30 void MockFileChangeObserver::OnCreateFileFrom(const FileSystemURL& url,
31 const FileSystemURL& src) {
32 create_file_from_count_++;
35 void MockFileChangeObserver::OnRemoveFile(const FileSystemURL& url) {
36 remove_file_count_++;
39 void MockFileChangeObserver::OnModifyFile(const FileSystemURL& url) {
40 modify_file_count_++;
43 void MockFileChangeObserver::OnCreateDirectory(const FileSystemURL& url) {
44 create_directory_count_++;
47 void MockFileChangeObserver::OnRemoveDirectory(const FileSystemURL& url) {
48 remove_directory_count_++;
51 } // namespace storage