summaryrefslogtreecommitdiffstats
path: root/components/web_restrictions/browser/mock_web_restrictions_client.cc
blob: acc849cc3e0bdb82ad93262e2b69484bb909f81b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2016 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.

#include "components/web_restrictions/browser/mock_web_restrictions_client.h"

#include "jni/MockWebRestrictionsClient_jni.h"

namespace web_restrictions {

MockWebRestrictionsClient::MockWebRestrictionsClient() {
  Java_MockWebRestrictionsClient_registerAsMockForTesting(
      base::android::AttachCurrentThread());
}

MockWebRestrictionsClient::~MockWebRestrictionsClient() {
  Java_MockWebRestrictionsClient_unregisterAsMockForTesting(
      base::android::AttachCurrentThread());
}

bool MockWebRestrictionsClient::Register(JNIEnv* env) {
  return RegisterNativesImpl(env);
}

}  // namespace web_restrictions