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

Delta Between Two Patch Sets: src/org/adblockplus/android/CrashHandler.java

Issue 4705284891082752: Proxy configurators (Closed)
Left Patch Set: FIXME removed Created Aug. 19, 2014, 12:58 p.m.
Right Patch Set: Last batch of review issues Created Aug. 24, 2014, 11:52 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/org/adblockplus/android/ConfigurationActivity.java ('k') | src/org/adblockplus/android/Preferences.java » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 { 169 {
170 p = Integer.valueOf(port); 170 p = Integer.valueOf(port);
171 } 171 }
172 catch (final NumberFormatException e) 172 catch (final NumberFormatException e)
173 { 173 {
174 // ignore - no valid port, it will be correctly processed later 174 // ignore - no valid port, it will be correctly processed later
175 } 175 }
176 176
177 try 177 try
178 { 178 {
179 final ProxyProperties proxyProperties = new ProxyProperties(this.host, p, this.excl);
180 final LinkProperties linkProperties = LinkProperties.fromContext(this.cont ext); 179 final LinkProperties linkProperties = LinkProperties.fromContext(this.cont ext);
181 if (linkProperties != null && linkProperties.isValid()) 180 if (linkProperties != null && linkProperties.isValid())
182 { 181 {
183 linkProperties.setHttpProxy(proxyProperties); 182 linkProperties.setHttpProxy(new ProxyProperties(this.host, p, this.excl) );
184 } 183 }
185 } 184 }
186 catch (final Throwable t) 185 catch (final Throwable t)
187 { 186 {
188 // This method here must not throw any exceptions to make sure it does not kill anything else. 187 // This method here must not throw any exceptions to make sure it does not kill anything else.
189 // And it's safe to ignore this exception here, because if resetting the p roxy fails, then it fails ... and we don't get a second chance to 188 // And it's safe to ignore this exception here, because if resetting the p roxy fails, then it fails ... and we don't get a second chance to
190 // clear it again (because we're most likely currently crashing). 189 // clear it again (because we're most likely currently crashing).
191 } 190 }
192 } 191 }
193 } 192 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld