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

Side by Side Diff: content/browser/fileapi/mock_file_update_observer.h

Issue 2398463004: browser_test that creates filesystem resources in extension origin (Closed)
Patch Set: Rebase & apply alex's fixes. Created 4 years 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef CONTENT_BROWSER_FILEAPI_MOCK_FILE_UPDATE_OBSERVER_H_ 5 #ifndef CONTENT_BROWSER_FILEAPI_MOCK_FILE_UPDATE_OBSERVER_H_
6 #define CONTENT_BROWSER_FILEAPI_MOCK_FILE_UPDATE_OBSERVER_H_ 6 #define CONTENT_BROWSER_FILEAPI_MOCK_FILE_UPDATE_OBSERVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "storage/browser/fileapi/file_observers.h" 14 #include "storage/browser/fileapi/file_observers.h"
15 #include "storage/browser/fileapi/file_system_url.h" 15 #include "storage/browser/fileapi/file_system_url.h"
16 #include "storage/browser/fileapi/task_runner_bound_observer_list.h" 16 #include "storage/browser/fileapi/task_runner_bound_observer_list.h"
17 17
18 namespace storage { 18 namespace storage {
19 19
20 // Mock file change observer. 20 // Mock file change observer for use in unittests.
21 class MockFileUpdateObserver : public FileUpdateObserver { 21 class MockFileUpdateObserver : public FileUpdateObserver {
22 public: 22 public:
23 MockFileUpdateObserver(); 23 MockFileUpdateObserver();
24 ~MockFileUpdateObserver() override; 24 ~MockFileUpdateObserver() override;
25 25
26 // Creates a ChangeObserverList which only contains given |observer|. 26 // Creates a ChangeObserverList which only contains given |observer|.
27 static UpdateObserverList CreateList(MockFileUpdateObserver* observer); 27 static UpdateObserverList CreateList(MockFileUpdateObserver* observer);
28 28
29 // FileUpdateObserver overrides. 29 // FileUpdateObserver overrides.
30 void OnStartUpdate(const FileSystemURL& url) override; 30 void OnStartUpdate(const FileSystemURL& url) override;
(...skipping 12 matching lines...) Expand all
43 std::map<FileSystemURL, int, FileSystemURL::Comparator> start_update_count_; 43 std::map<FileSystemURL, int, FileSystemURL::Comparator> start_update_count_;
44 std::map<FileSystemURL, int, FileSystemURL::Comparator> end_update_count_; 44 std::map<FileSystemURL, int, FileSystemURL::Comparator> end_update_count_;
45 bool is_ready_; 45 bool is_ready_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(MockFileUpdateObserver); 47 DISALLOW_COPY_AND_ASSIGN(MockFileUpdateObserver);
48 }; 48 };
49 49
50 } // namespace storage 50 } // namespace storage
51 51
52 #endif // CONTENT_BROWSER_FILEAPI_MOCK_FILE_UPDATE_OBSERVER_H_ 52 #endif // CONTENT_BROWSER_FILEAPI_MOCK_FILE_UPDATE_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_security_exploit_browsertest.cc ('k') | content/public/test/browser_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698