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

Unified Diff: content/browser/fileapi/mock_file_update_observer.h

Issue 2368913003: Populate storage_unittests target. (Closed)
Patch Set: Removed unnecessary include from storage/browser/blob/blob_storage_context_unittest.cc. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/fileapi/mock_file_update_observer.h
diff --git a/content/browser/fileapi/mock_file_update_observer.h b/content/browser/fileapi/mock_file_update_observer.h
deleted file mode 100644
index c4af5c05460a8c8330c238166918992c3c61ba28..0000000000000000000000000000000000000000
--- a/content/browser/fileapi/mock_file_update_observer.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2014 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.
-
-#ifndef CONTENT_BROWSER_FILEAPI_MOCK_FILE_UPDATE_OBSERVER_H_
-#define CONTENT_BROWSER_FILEAPI_MOCK_FILE_UPDATE_OBSERVER_H_
-
-#include <stdint.h>
-
-#include <map>
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "storage/browser/fileapi/file_observers.h"
-#include "storage/browser/fileapi/file_system_url.h"
-#include "storage/browser/fileapi/task_runner_bound_observer_list.h"
-
-namespace storage {
-
-// Mock file change observer.
-class MockFileUpdateObserver : public FileUpdateObserver {
- public:
- MockFileUpdateObserver();
- ~MockFileUpdateObserver() override;
-
- // Creates a ChangeObserverList which only contains given |observer|.
- static UpdateObserverList CreateList(MockFileUpdateObserver* observer);
-
- // FileUpdateObserver overrides.
- void OnStartUpdate(const FileSystemURL& url) override;
- void OnUpdate(const FileSystemURL& url, int64_t delta) override;
- void OnEndUpdate(const FileSystemURL& url) override;
-
- void Enable() { is_ready_ = true; }
-
- void Disable() {
- start_update_count_.clear();
- end_update_count_.clear();
- is_ready_ = false;
- }
-
- private:
- std::map<FileSystemURL, int, FileSystemURL::Comparator> start_update_count_;
- std::map<FileSystemURL, int, FileSystemURL::Comparator> end_update_count_;
- bool is_ready_;
-
- DISALLOW_COPY_AND_ASSIGN(MockFileUpdateObserver);
-};
-
-} // namespace storage
-
-#endif // CONTENT_BROWSER_FILEAPI_MOCK_FILE_UPDATE_OBSERVER_H_
« no previous file with comments | « content/browser/fileapi/mock_file_change_observer.cc ('k') | content/browser/fileapi/mock_file_update_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698