Index: third_party/grpc/include/grpc++/security/auth_metadata_processor.h |
diff --git a/third_party/WebKit/Source/core/style/StyleGridItemData.h b/third_party/grpc/include/grpc++/security/auth_metadata_processor.h |
similarity index 51% |
copy from third_party/WebKit/Source/core/style/StyleGridItemData.h |
copy to third_party/grpc/include/grpc++/security/auth_metadata_processor.h |
index 02c356302a0d14121e16c648a235910c2e45c902..25011f33bafae0206d95f4f93dcdcc1a62d30fd1 100644 |
--- a/third_party/WebKit/Source/core/style/StyleGridItemData.h |
+++ b/third_party/grpc/include/grpc++/security/auth_metadata_processor.h |
@@ -1,5 +1,7 @@ |
/* |
- * Copyright (C) 2012 Google Inc. All rights reserved. |
+ * |
+ * Copyright 2015, Google Inc. |
+ * All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are |
@@ -26,44 +28,46 @@ |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+ * |
*/ |
-#ifndef StyleGridItemData_h |
-#define StyleGridItemData_h |
- |
+#ifndef GRPCXX_AUTH_METADATA_PROCESSOR_H_ |
+#define GRPCXX_AUTH_METADATA_PROCESSOR_H_ |
-#include "core/style/GridPosition.h" |
-#include "wtf/PassRefPtr.h" |
-#include "wtf/RefCounted.h" |
+#include <map> |
-namespace blink { |
+#include <grpc++/security/auth_context.h> |
+#include <grpc++/support/status.h> |
+#include <grpc++/support/string_ref.h> |
-class StyleGridItemData : public RefCounted<StyleGridItemData> { |
-public: |
- static PassRefPtr<StyleGridItemData> create() { return adoptRef(new StyleGridItemData); } |
- PassRefPtr<StyleGridItemData> copy() const { return adoptRef(new StyleGridItemData(*this)); } |
+namespace grpc { |
- bool operator==(const StyleGridItemData& o) const |
- { |
- return m_gridColumnStart == o.m_gridColumnStart && m_gridColumnEnd == o.m_gridColumnEnd |
- && m_gridRowStart == o.m_gridRowStart && m_gridRowEnd == o.m_gridRowEnd; |
- } |
+class AuthMetadataProcessor { |
+ public: |
+ typedef std::multimap<grpc::string_ref, grpc::string_ref> InputMetadata; |
+ typedef std::multimap<grpc::string, grpc::string> OutputMetadata; |
- bool operator!=(const StyleGridItemData& o) const |
- { |
- return !(*this == o); |
- } |
+ virtual ~AuthMetadataProcessor() {} |
- GridPosition m_gridColumnStart; |
- GridPosition m_gridColumnEnd; |
- GridPosition m_gridRowStart; |
- GridPosition m_gridRowEnd; |
+ // If this method returns true, the Process function will be scheduled in |
+ // a different thread from the one processing the call. |
+ virtual bool IsBlocking() const { return true; } |
-private: |
- StyleGridItemData(); |
- StyleGridItemData(const StyleGridItemData&); |
+ // context is read/write: it contains the properties of the channel peer and |
+ // it is the job of the Process method to augment it with properties derived |
+ // from the passed-in auth_metadata. |
+ // consumed_auth_metadata needs to be filled with metadata that has been |
+ // consumed by the processor and will be removed from the call. |
+ // response_metadata is the metadata that will be sent as part of the |
+ // response. |
+ // If the return value is not Status::OK, the rpc call will be aborted with |
+ // the error code and error message sent back to the client. |
+ virtual Status Process(const InputMetadata& auth_metadata, |
+ AuthContext* context, |
+ OutputMetadata* consumed_auth_metadata, |
+ OutputMetadata* response_metadata) = 0; |
}; |
-} // namespace blink |
+} // namespace grpc |
-#endif // StyleGridItemData_h |
+#endif // GRPCXX_AUTH_METADATA_PROCESSOR_H_ |