Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/org/adblockplus/libadblockplus/UpdaterCallback.java

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Patch Set: Adressed first batch of review issues. Created April 16, 2014, 5:36 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/org/adblockplus/libadblockplus/Subscription.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 19 matching lines...) Expand all
30 System.loadLibrary("adblockplus-jni"); 30 System.loadLibrary("adblockplus-jni");
31 registerNatives(); 31 registerNatives();
32 } 32 }
33 33
34 public UpdaterCallback() 34 public UpdaterCallback()
35 { 35 {
36 this.ptr = ctor(this); 36 this.ptr = ctor(this);
37 this.disposer = new Disposer(this, new DisposeWrapper(this.ptr)); 37 this.disposer = new Disposer(this, new DisposeWrapper(this.ptr));
38 } 38 }
39 39
40 public abstract void updaterCallback(String arg); 40 public abstract void updaterCallback(String error);
41 41
42 @Override 42 @Override
43 public void dispose() 43 public void dispose()
44 { 44 {
45 this.disposer.dispose(); 45 this.disposer.dispose();
46 } 46 }
47 47
48 private final static class DisposeWrapper implements Disposable 48 private final static class DisposeWrapper implements Disposable
49 { 49 {
50 private final long ptr; 50 private final long ptr;
51 51
52 public DisposeWrapper(final long ptr) 52 public DisposeWrapper(final long ptr)
53 { 53 {
54 this.ptr = ptr; 54 this.ptr = ptr;
55 } 55 }
56 56
57 @Override 57 @Override
58 public void dispose() 58 public void dispose()
59 { 59 {
60 dtor(this.ptr); 60 dtor(this.ptr);
61 } 61 }
62 } 62 }
63 63
64 private final static native void registerNatives(); 64 private final static native void registerNatives();
65 65
66 private final static native long ctor(Object callbackObject); 66 private final static native long ctor(Object callbackObject);
67 67
68 private final static native void dtor(long ptr); 68 private final static native void dtor(long ptr);
69 } 69 }
OLDNEW
« no previous file with comments | « src/org/adblockplus/libadblockplus/Subscription.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld