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

Delta Between Two Patch Sets: src/plugin/Config.h

Issue 11013110: Cleanup (Closed)
Left Patch Set: SetPref/GetPref type safety. Comments addressed. Created July 22, 2013, 12:42 a.m.
Right Patch Set: More beautification and addressing comments Created July 29, 2013, 12:13 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/plugin/AdblockPlusTab.cpp ('k') | src/plugin/DownloadSource.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 #ifndef _CONFIG_H 1 #ifndef _CONFIG_H
2 #define _CONFIG_H 2 #define _CONFIG_H
3 3
4 // ----------------------------------------------------------------------------
5 // Filter configuration
6 // ----------------------------------------------------------------------------
7
8 #ifdef NDEBUG
9 #undef _DEBUG
10 #endif
11
12 // Define filter configuration
13 #if (defined PRODUCT_ADBLOCKPLUS)
14 #define FILTERS_PROTOCOL "https://"
15 #define FILTERS_HOST "easylist-downloads.adblockplus.org"
16 #endif
17
18 // ----------------------------------------------------------------------------
19 // Define default protocols, hosts, scripts and pages
20 // ----------------------------------------------------------------------------
21
22 #define USERS_PROTOCOL L"http://"
23 #define USERS_PATH L""
24 #define USERS_PORT INTERNET_DEFAULT_HTTP_PORT
25
26 #define USERS_SCRIPT_SETTINGS L"/user_manager.php"
27 #define USERS_SCRIPT_ABOUT L"/user_about.php"
28 #define USERS_SCRIPT_FAQ L"/user_faq.php"
29 #define USERS_SCRIPT_FEEDBACK L"/user_feedback.php"
30 #define USERS_SCRIPT_INFO L"/user_info.php"
31 #define USERS_SCRIPT_WELCOME L"/user_welcome.php"
32 #define USERS_SCRIPT_USER_SETTINGS L"/user_mysettings.php"
33 #define USERS_SCRIPT_INVITATION L"/user_invitation.php"
34 #define USERS_SCRIPT_UPGRADE L"/user_upgrade.php"
35
36 // ----------------------------------------------------------------------------
37 // Define actual configurations
38 // ----------------------------------------------------------------------------
39
40 // AdblockPlus configuration
41
42
43 #if (defined PRODUCT_ADBLOCKPLUS)
44 #define ABPDOMAIN L"adblockplus.org"
45 #ifdef ADBLOCKPLUS_TEST_MODE
46 #define USERS_HOST L"127.0.0.1"
47 #elif (defined ADBLOCKPLUS_PRODUCTION_MODE)
48 #ifdef _DEBUG
49 #define USERS_HOST L"127.0.0.1"
50 #else
51 #define USERS_HOST L"update.adblockplus.org"
52 #endif
53 #else
54 #error "Undefined mode. Please use configuation Release Production/Test or Debug Production/Test"
55 #endif
56 #else
57 #error "Undefined product. Please specify PRODUCT_ADBLOCKPLUS in configuration"
58 #endif
59
60 // ----------------------------------------------------------------------------
61 // Timers
62 // ----------------------------------------------------------------------------
63
64 // Time interval between user registration trials
65 #define TIMER_INTERVAL_USER_REGISTRATION 1000
66
67 // How long time should we wait between each try of initializing the server clie nt (ms)
68 #ifdef _DEBUG
69 #define TIMER_INTERVAL_SERVER_CLIENT_INIT 10000
70 #else
71 #define TIMER_INTERVAL_SERVER_CLIENT_INIT 120000
72 #endif
73
74 // How long time sleep in background thread (ms)
75 #define TIMER_THREAD_SLEEP_USER_REGISTRATION 10000
76 #define TIMER_THREAD_SLEEP_MAIN_LOOP 60000
77 #define TIMER_THREAD_SLEEP_TAB_LOOP 10000 4 #define TIMER_THREAD_SLEEP_TAB_LOOP 10000
78
79 5
80 // Should we to on debug information 6 // Should we to on debug information
81 #ifdef _DEBUG 7 #ifdef _DEBUG
82 #define ENABLE_DEBUG_INFO 8 #define ENABLE_DEBUG_INFO
83 #define ENABLE_DEBUG_GENERAL 9 #define ENABLE_DEBUG_GENERAL
84 #define ENABLE_DEBUG_ERROR 10 #define ENABLE_DEBUG_ERROR
85 #undef ENABLE_DEBUG_BLOCKER 11 #undef ENABLE_DEBUG_BLOCKER
86 #undef ENABLE_DEBUG_FILTER 12 #undef ENABLE_DEBUG_FILTER
87 #undef ENABLE_DEBUG_SETTINGS 13 #undef ENABLE_DEBUG_SETTINGS
88 #undef ENABLE_DEBUG_THREAD 14 #undef ENABLE_DEBUG_THREAD
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 #undef DEBUG_ERROR_LOG 114 #undef DEBUG_ERROR_LOG
189 #define DEBUG_ERROR_LOG(err, id, subid, description) CPluginClient::LogPluginErr or(err, id, subid, description); 115 #define DEBUG_ERROR_LOG(err, id, subid, description) CPluginClient::LogPluginErr or(err, id, subid, description);
190 116
191 // ---------------------------------------------------------------------------- 117 // ----------------------------------------------------------------------------
192 // Features 118 // Features
193 // ---------------------------------------------------------------------------- 119 // ----------------------------------------------------------------------------
194 120
195 #if (defined PRODUCT_ADBLOCKPLUS) 121 #if (defined PRODUCT_ADBLOCKPLUS)
196 #define SUPPORT_FILTER 122 #define SUPPORT_FILTER
197 #define SUPPORT_WHITELIST 123 #define SUPPORT_WHITELIST
198 #undef SUPPORT_FILE_DOWNLOAD
199 #undef SUPPORT_CONFIG
200 #define SUPPORT_DOM_TRAVERSER 124 #define SUPPORT_DOM_TRAVERSER
201 #define SUPPORT_FRAME_CACHING 125 #define SUPPORT_FRAME_CACHING
202 #endif 126 #endif
203 127
204 // ---------------------------------------------------------------------------- 128 // ----------------------------------------------------------------------------
205 // Miscellaneous 129 // Miscellaneous
206 // ---------------------------------------------------------------------------- 130 // ----------------------------------------------------------------------------
207 131
208 //For debugging production build 132 //For debugging production build
209 //#define ENABLE_DEBUG_INFO 133 //#define ENABLE_DEBUG_INFO
210 134
211
212 // Max elements in white list menus
213 #define DOMAIN_HISTORY_MAX_COUNT 5
214
215 // Max registration attempts
216 #define REGISTRATION_MAX_ATTEMPTS 5
217
218 // If defined, we will surround most of the methods with try catch 135 // If defined, we will surround most of the methods with try catch
219 #undef CATCHALL 136 #undef CATCHALL
220 137
221 // If defined, we will throw exceptions for errors 138 // If defined, we will throw exceptions for errors
222 // Otherwise we will try to handle it in a silent way, and only report 139 // Otherwise we will try to handle it in a silent way, and only report
223 #undef THROW_ON_ERROR 140 #undef THROW_ON_ERROR
224
225 // Should we report errors to the local filesystem and/or to the ad plugin serve r
226 #ifdef ADBLOCKPLUS_PRODUCTION_MODE
227 #undef REPORT_ERROR_FILE
228 #undef REPORT_ERROR_SERVER
229 #else
230 #define REPORT_ERROR_FILE
231 #define REPORT_ERROR_SERVER
232 #endif
233
234 // Should we shut down plugin automatically before starting the
235 // installer? Remember to change the dictionary POSTDOWNLOADTEXT text
236 // to correspond to this behaviour.
237 // ex. AUTOMATIC_SHUTDOWN - "If you choose to install the new plugin, you Explor er will close before installation."
238 // or NO_AUTOMATIC_SHUTDOWN" - "If you choose to install the new plugin, you ha ve to restart Explorer for the update to take effect"
239 #define AUTOMATIC_SHUTDOWN
240
241
242 #if (defined PRODUCT_ADBLOCKPLUS)
243 //This is used as an agent string for HTTP requests to our servers from the plug in
244 #define BHO_NAME _T("Adblock Plus BHO/1.0")
245 #endif
246
247 // Name of ini file in Windows directory for uninstall
248 #if (defined PRODUCT_ADBLOCKPLUS)
249 #define UNINSTALL_INI_FILE "AdBlockPlus.ini"
250 #endif
251
252 // Prefix on temp dir files
253 #if (defined PRODUCT_ADBLOCKPLUS)
254 #define TEMP_FILE_PREFIX "ab_"
255 #endif
256
257 // Dictionary filename
258 #if (defined PRODUCT_ADBLOCKPLUS)
259 #define DICTIONARY_INI_FILE "dictionary_w.ini"
260 #else
261 #define DICTIONARY_INI_FILE "dictionary.ini"
262 #endif
263 #define DICTIONARY_DIR_NAME "Languages\\"
264 #define DEFAULT_LANGUAGE "en-US"
265
266 #define SETTING_PAGE_INI_FILE "settings_page_w.ini"
267
268 // Config filename
269 #ifdef SUPPORT_CONFIG
270 #define CONFIG_INI_FILE "config.ini"
271 #endif
272
273 // Settings filename
274 #define SETTINGS_INI_FILE "settings.ini"
275
276 // Settings tab filename
277 #define SETTINGS_INI_FILE_TAB "settings_tab.ini"
278
279 // Setting whitelist filename
280 #ifdef SUPPORT_WHITELIST
281 #define SETTINGS_INI_FILE_WHITELIST "settings_whitelist.ini"
282 #endif
283
284 // Personal filter filename
285 #ifdef SUPPORT_FILTER
286 #define PERSONAL_FILTER_FILE "filter_personal.txt"
287 #define PERSONAL_FILTER_FILE_OLD "easylist_personal.txt"
288 #endif
289
290 // Install MSI filename
291 #if (defined PRODUCT_ADBLOCKPLUS)
292 #define INSTALL_MSI_FILE "adblock.msi"
293 #define INSTALL_EXE_FILE "Setup.exe"
294 #endif
295 141
296 // Status bar pane name 142 // Status bar pane name
297 #if (defined PRODUCT_ADBLOCKPLUS) 143 #if (defined PRODUCT_ADBLOCKPLUS)
298 #define STATUSBAR_PANE_NAME "AdblockPlusStatusBarPane" 144 #define STATUSBAR_PANE_NAME "AdblockPlusStatusBarPane"
299 #endif 145 #endif
300 146
301 // Status bar pane number 147 // Status bar pane number
302 #if (defined PRODUCT_ADBLOCKPLUS) 148 #if (defined PRODUCT_ADBLOCKPLUS)
303 #define STATUSBAR_PANE_NUMBER 2 149 #define STATUSBAR_PANE_NUMBER 2
304 #endif 150 #endif
305 151
306 152
307 153
308 #endif // _CONFIG_H 154 #endif // _CONFIG_H
LEFTRIGHT

Powered by Google App Engine
This is Rietveld