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

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

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 12 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
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>
9
8 #include <map> 10 #include <map>
9 11
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h"
12 #include "storage/browser/fileapi/file_observers.h" 14 #include "storage/browser/fileapi/file_observers.h"
13 #include "storage/browser/fileapi/file_system_url.h" 15 #include "storage/browser/fileapi/file_system_url.h"
14 #include "storage/browser/fileapi/task_runner_bound_observer_list.h" 16 #include "storage/browser/fileapi/task_runner_bound_observer_list.h"
15 17
16 namespace storage { 18 namespace storage {
17 19
18 // Mock file change observer. 20 // Mock file change observer.
19 class MockFileUpdateObserver : public FileUpdateObserver { 21 class MockFileUpdateObserver : public FileUpdateObserver {
20 public: 22 public:
21 MockFileUpdateObserver(); 23 MockFileUpdateObserver();
22 ~MockFileUpdateObserver() override; 24 ~MockFileUpdateObserver() override;
23 25
24 // Creates a ChangeObserverList which only contains given |observer|. 26 // Creates a ChangeObserverList which only contains given |observer|.
25 static UpdateObserverList CreateList(MockFileUpdateObserver* observer); 27 static UpdateObserverList CreateList(MockFileUpdateObserver* observer);
26 28
27 // FileUpdateObserver overrides. 29 // FileUpdateObserver overrides.
28 void OnStartUpdate(const FileSystemURL& url) override; 30 void OnStartUpdate(const FileSystemURL& url) override;
29 void OnUpdate(const FileSystemURL& url, int64 delta) override; 31 void OnUpdate(const FileSystemURL& url, int64_t delta) override;
30 void OnEndUpdate(const FileSystemURL& url) override; 32 void OnEndUpdate(const FileSystemURL& url) override;
31 33
32 void Enable() { is_ready_ = true; } 34 void Enable() { is_ready_ = true; }
33 35
34 void Disable() { 36 void Disable() {
35 start_update_count_.clear(); 37 start_update_count_.clear();
36 end_update_count_.clear(); 38 end_update_count_.clear();
37 is_ready_ = false; 39 is_ready_ = false;
38 } 40 }
39 41
40 private: 42 private:
41 std::map<FileSystemURL, int, FileSystemURL::Comparator> start_update_count_; 43 std::map<FileSystemURL, int, FileSystemURL::Comparator> start_update_count_;
42 std::map<FileSystemURL, int, FileSystemURL::Comparator> end_update_count_; 44 std::map<FileSystemURL, int, FileSystemURL::Comparator> end_update_count_;
43 bool is_ready_; 45 bool is_ready_;
44 46
45 DISALLOW_COPY_AND_ASSIGN(MockFileUpdateObserver); 47 DISALLOW_COPY_AND_ASSIGN(MockFileUpdateObserver);
46 }; 48 };
47 49
48 } // namespace storage 50 } // namespace storage
49 51
50 #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 | « content/browser/fileapi/mock_file_change_observer.h ('k') | content/browser/fileapi/mock_file_update_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698