#ifndef ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_ORIGIN_MATCHER_H_
#define ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_ORIGIN_MATCHER_H_
#include <memory>
#include <string>
#include <vector>
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
namespace url {
class Origin;
}
namespace origin_matcher {
class OriginMatcher;
}
namespace android_webview {
class AwContentsOriginMatcher
: public base::RefCountedThreadSafe<AwContentsOriginMatcher> {
public:
AwContentsOriginMatcher();
bool MatchesOrigin(const url::Origin& origin);
std::vector<std::string> UpdateRuleList(
const std::vector<std::string>& rules);
private:
friend class base::RefCountedThreadSafe<AwContentsOriginMatcher>;
~AwContentsOriginMatcher();
base::Lock lock_;
std::unique_ptr<origin_matcher::OriginMatcher> origin_matcher_;
};
}
#endif