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

Unified Diff: chrome/browser/extensions/api/system_info_storage/test_storage_info_provider.h

Issue 18578008: [SystemInfo API] Move Storage API out of experimental namespace and rename to the "system" namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix PermissionTest unittest. Created 7 years, 5 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: chrome/browser/extensions/api/system_info_storage/test_storage_info_provider.h
diff --git a/chrome/browser/extensions/api/system_info_storage/test_storage_info_provider.h b/chrome/browser/extensions/api/system_info_storage/test_storage_info_provider.h
deleted file mode 100644
index 0ab3d4c5a3fbe46ee98af68e27fa3d08a3040425..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/system_info_storage/test_storage_info_provider.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2013 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 CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_STORAGE_TEST_STORAGE_INFO_PROVIDER_H_
-#define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_STORAGE_TEST_STORAGE_INFO_PROVIDER_H_
-
-#include <vector>
-
-#include "chrome/browser/extensions/api/system_info_storage/storage_info_provider.h"
-#include "chrome/browser/storage_monitor/storage_info.h"
-
-namespace extensions {
-
-struct TestStorageUnitInfo {
- const char* device_id;
- const char* transient_id;
- const char* name;
- const char* type;
- // Total amount of the storage device space, in bytes.
- double capacity;
- // The available amount of the storage space, in bytes.
- double available_capacity;
- // The change step of available capacity for simulating the free space change.
- // Each querying operation will increase the |available_capacity| with this
- // value.
- int change_step;
-};
-
-// StorageInfoProvider for unit_tests and browser_tests.
-// Override related methods to avoid calling out to the actual system.
-//
-// TODO(Haojian) : Improve StorageInfoProvider test. Create a interface that
-// represents system storage functions, with a googlemock implementation.
-class TestStorageInfoProvider : public extensions::StorageInfoProvider {
- public:
- TestStorageInfoProvider(const struct TestStorageUnitInfo* testing_data,
- size_t n);
-
- static chrome::StorageInfo BuildStorageInfo(const TestStorageUnitInfo& unit);
-
- virtual std::string GetTransientIdForDeviceId(
- const std::string& device_id) const OVERRIDE;
- virtual std::string GetDeviceIdForTransientId(
- const std::string& transient_id) const OVERRIDE;
-
- protected:
- virtual ~TestStorageInfoProvider();
-
- // StorageInfoProvider implementations.
- virtual void GetAllStoragesIntoInfoList() OVERRIDE;
- virtual std::vector<chrome::StorageInfo> GetAllStorages() const OVERRIDE;
- virtual int64 GetStorageFreeSpaceFromTransientId(
- const std::string& transient_id) OVERRIDE;
-
- std::vector<struct TestStorageUnitInfo> testing_data_;
-};
-
-} // namespace extensions
-#endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_STORAGE_TEST_STORAGE_INFO_PROVIDER_H_
-

Powered by Google App Engine
This is Rietveld 408576698