| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 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. | |
| 4 | |
| 5 #ifndef CONTENT_CHILD_EXPERIMENTS_API_KEY_VALIDATOR_H_ | |
| 6 #define CONTENT_CHILD_EXPERIMENTS_API_KEY_VALIDATOR_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include "third_party/WebKit/public/platform/WebApiKeyValidator.h" | |
| 10 | |
| 11 namespace content { | |
| 12 | |
| 13 // The ApiKeyValidator is called by the Experimental Framework code in Blink to | |
| 14 // validate tokens to enable experimental APIs. | |
| 15 // | |
| 16 // This class is thread-safe. | |
| 17 class ApiKeyValidator : public blink::WebApiKeyValidator { | |
| 18 public: | |
| 19 ApiKeyValidator(); | |
| 20 ~ApiKeyValidator() override; | |
| 21 | |
| 22 // blink::WebApiKeyValidator implementation | |
| 23 bool validateApiKey(const blink::WebString& apiKey, | |
| 24 const blink::WebString& origin, | |
| 25 const blink::WebString& apiName) override; | |
| 26 | |
| 27 private: | |
| 28 DISALLOW_COPY_AND_ASSIGN(ApiKeyValidator); | |
| 29 }; | |
| 30 | |
| 31 } // namespace content | |
| 32 | |
| 33 #endif // CONTENT_CHILD_EXPERIMENTS_API_KEY_VALIDATOR_H_ | |
| OLD | NEW |