Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Side by Side Diff: components/web_restrictions/browser/mock_web_restrictions_client.h

Issue 1684153002: Web restrictions component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GN test target names Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 COMPONENTS_WEB_RESTRICTIONS_BROWSER_MOCK_WEB_RESTRICTIONS_CLIENT_H_
6 #define COMPONENTS_WEB_RESTRICTIONS_BROWSER_MOCK_WEB_RESTRICTIONS_CLIENT_H_
7
8 #include "base/macros.h"
9 #include "jni/MockWebRestrictionsClient_jni.h"
10
11 namespace web_restrictions {
12
13 // This is a wrapper for the Java MockWebRestrictionsClient.
14 class MockWebRestrictionsClient {
15 public:
16 MockWebRestrictionsClient() {
Bernhard Bauer 2016/02/23 14:29:13 Usually, these method bodies should be out of line
aberent 2016/02/23 16:26:51 Done.
17 Java_MockWebRestrictionsClient_registerAsMockForTesting(
18 base::android::AttachCurrentThread());
19 }
20
21 ~MockWebRestrictionsClient() {
22 Java_MockWebRestrictionsClient_unregisterAsMockForTesting(
23 base::android::AttachCurrentThread());
24 }
25
26 static bool Register(JNIEnv* env) { return RegisterNativesImpl(env); }
27 };
28
29 } // namespace web_restrictions
30 #endif // COMPONENTS_WEB_RESTRICTIONS_BROWSER_MOCK_WEB_RESTRICTIONS_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698