Chromium Code Reviews| Index: chrome/browser/chromeos/file_system_provider/request_value.h |
| diff --git a/chrome/browser/chromeos/file_system_provider/request_value.h b/chrome/browser/chromeos/file_system_provider/request_value.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..36c4f98dd8667b75651daaeed9b128edf5de89dc |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/file_system_provider/request_value.h |
| @@ -0,0 +1,52 @@ |
| +// 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 CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REQUEST_VALUE_H_ |
| +#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REQUEST_VALUE_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/common/extensions/api/file_system_provider_internal.h" |
| + |
| +namespace chromeos { |
| +namespace file_system_provider { |
| + |
| +// Holds a parsed value returned by a providing extension. Each accessor can |
| +// return NULL in case the requested value type is not available. It is used |
| +// to pass values of success callbacks. |
| +class RequestValue { |
| + public: |
| + // Creates an empty value. Use static methods to create a value holding a |
| + // proper content. |
| + RequestValue(); |
| + |
| + virtual ~RequestValue(); |
| + |
| + static RequestValue* CreateForUnmountSuccess( |
|
kinaba
2014/04/25 06:35:06
Returning scoped_ptr<RequestValue> may be slightly
mtomasz
2014/04/28 00:42:47
Done.
|
| + scoped_ptr<extensions::api::file_system_provider_internal:: |
| + UnmountRequestedSuccess::Params> params); |
| + |
| + static RequestValue* CreateForTesting(const std::string& params); |
|
kinaba
2014/04/25 06:35:06
ditto
mtomasz
2014/04/28 00:42:47
Done.
|
| + |
| + std::string* get_testing_params() { return testing_params_.get(); } |
| + |
| + extensions::api::file_system_provider_internal::UnmountRequestedSuccess:: |
| + Params* |
| + get_unmount_success_params() { |
| + return unmount_success_params_.get(); |
| + } |
| + |
| + private: |
| + scoped_ptr<extensions::api::file_system_provider_internal:: |
| + UnmountRequestedSuccess::Params> unmount_success_params_; |
| + scoped_ptr<std::string> testing_params_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(RequestValue); |
| +}; |
| + |
| +} // namespace file_system_provider |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REQUEST_VALUE_H_ |