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

Side by Side Diff: content/browser/fileapi/mock_file_change_observer.cc

Issue 2368913003: Populate storage_unittests target. (Closed)
Patch Set: Removed unnecessary include from storage/browser/blob/blob_storage_context_unittest.cc. Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "content/browser/fileapi/mock_file_change_observer.h"
6
7 #include "base/threading/thread_task_runner_handle.h"
8
9 namespace storage {
10
11 MockFileChangeObserver::MockFileChangeObserver()
12 : create_file_count_(0),
13 create_file_from_count_(0),
14 remove_file_count_(0),
15 modify_file_count_(0),
16 create_directory_count_(0),
17 remove_directory_count_(0) {}
18
19 MockFileChangeObserver::~MockFileChangeObserver() {}
20
21 // static
22 ChangeObserverList MockFileChangeObserver::CreateList(
23 MockFileChangeObserver* observer) {
24 ChangeObserverList list;
25 return list.AddObserver(observer, base::ThreadTaskRunnerHandle::Get().get());
26 }
27
28 void MockFileChangeObserver::OnCreateFile(const FileSystemURL& url) {
29 create_file_count_++;
30 }
31
32 void MockFileChangeObserver::OnCreateFileFrom(const FileSystemURL& url,
33 const FileSystemURL& src) {
34 create_file_from_count_++;
35 }
36
37 void MockFileChangeObserver::OnRemoveFile(const FileSystemURL& url) {
38 remove_file_count_++;
39 }
40
41 void MockFileChangeObserver::OnModifyFile(const FileSystemURL& url) {
42 modify_file_count_++;
43 }
44
45 void MockFileChangeObserver::OnCreateDirectory(const FileSystemURL& url) {
46 create_directory_count_++;
47 }
48
49 void MockFileChangeObserver::OnRemoveDirectory(const FileSystemURL& url) {
50 remove_directory_count_++;
51 }
52
53 } // namespace storage
OLDNEW
« no previous file with comments | « content/browser/fileapi/mock_file_change_observer.h ('k') | content/browser/fileapi/mock_file_update_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698