Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / chromeos / file_system_provider / request_value.h
blob892873365157d991b1d6798768964a8a7b16c362
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REQUEST_VALUE_H_
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REQUEST_VALUE_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/common/extensions/api/file_system_provider_internal.h"
13 namespace chromeos {
14 namespace file_system_provider {
16 // Holds a parsed value returned by a providing extension. Each accessor can
17 // return NULL in case the requested value type is not available. It is used
18 // to pass values of success callbacks.
19 class RequestValue {
20 public:
21 // Creates an empty value. Use static methods to create a value holding a
22 // proper content.
23 RequestValue();
25 virtual ~RequestValue();
27 static scoped_ptr<RequestValue> CreateForUnmountSuccess(
28 scoped_ptr<extensions::api::file_system_provider_internal::
29 UnmountRequestedSuccess::Params> params);
31 static scoped_ptr<RequestValue> CreateForGetMetadataSuccess(
32 scoped_ptr<extensions::api::file_system_provider_internal::
33 GetMetadataRequestedSuccess::Params> params);
35 static scoped_ptr<RequestValue> CreateForTesting(const std::string& params);
37 const extensions::api::file_system_provider_internal::
38 UnmountRequestedSuccess::Params*
39 unmount_success_params() const {
40 return unmount_success_params_.get();
43 const extensions::api::file_system_provider_internal::
44 GetMetadataRequestedSuccess::Params*
45 get_metadata_success_params() const {
46 return get_metadata_success_params_.get();
49 const std::string* testing_params() const { return testing_params_.get(); }
51 private:
52 scoped_ptr<extensions::api::file_system_provider_internal::
53 UnmountRequestedSuccess::Params> unmount_success_params_;
54 scoped_ptr<extensions::api::file_system_provider_internal::
55 GetMetadataRequestedSuccess::Params>
56 get_metadata_success_params_;
57 scoped_ptr<std::string> testing_params_;
59 DISALLOW_COPY_AND_ASSIGN(RequestValue);
62 } // namespace file_system_provider
63 } // namespace chromeos
65 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REQUEST_VALUE_H_