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

Unified Diff: src/plugin/Config.h

Issue 11013110: Cleanup (Closed)
Patch Set: More refactoring. Removing main thread, tab counting. Implementing SetPref and GetPref. Addressing … Created July 9, 2013, 12:59 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/plugin/Config.h
===================================================================
--- a/src/plugin/Config.h
+++ b/src/plugin/Config.h
@@ -1,82 +1,8 @@
#ifndef _CONFIG_H
#define _CONFIG_H
-// ----------------------------------------------------------------------------
-// Filter configuration
-// ----------------------------------------------------------------------------
-
-#ifdef NDEBUG
-#undef _DEBUG
-#endif
-
-// Define filter configuration
-#if (defined PRODUCT_ADBLOCKPLUS)
-#define FILTERS_PROTOCOL "https://"
-#define FILTERS_HOST "easylist-downloads.adblockplus.org"
-#endif
-
-// ----------------------------------------------------------------------------
-// Define default protocols, hosts, scripts and pages
-// ----------------------------------------------------------------------------
-
-#define USERS_PROTOCOL L"http://"
-#define USERS_PATH L""
-#define USERS_PORT INTERNET_DEFAULT_HTTP_PORT
-
-#define USERS_SCRIPT_SETTINGS L"/user_manager.php"
-#define USERS_SCRIPT_ABOUT L"/user_about.php"
-#define USERS_SCRIPT_FAQ L"/user_faq.php"
-#define USERS_SCRIPT_FEEDBACK L"/user_feedback.php"
-#define USERS_SCRIPT_INFO L"/user_info.php"
-#define USERS_SCRIPT_WELCOME L"/user_welcome.php"
-#define USERS_SCRIPT_USER_SETTINGS L"/user_mysettings.php"
-#define USERS_SCRIPT_INVITATION L"/user_invitation.php"
-#define USERS_SCRIPT_UPGRADE L"/user_upgrade.php"
-
-// ----------------------------------------------------------------------------
-// Define actual configurations
-// ----------------------------------------------------------------------------
-
-// AdblockPlus configuration
-
-
-#if (defined PRODUCT_ADBLOCKPLUS)
-#define ABPDOMAIN L"adblockplus.org"
-#ifdef ADBLOCKPLUS_TEST_MODE
-#define USERS_HOST L"127.0.0.1"
-#elif (defined ADBLOCKPLUS_PRODUCTION_MODE)
-#ifdef _DEBUG
-#define USERS_HOST L"127.0.0.1"
-#else
-#define USERS_HOST L"update.adblockplus.org"
-#endif
-#else
-#error "Undefined mode. Please use configuation Release Production/Test or Debug Production/Test"
-#endif
-#else
-#error "Undefined product. Please specify PRODUCT_ADBLOCKPLUS in configuration"
-#endif
-
-// ----------------------------------------------------------------------------
-// Timers
-// ----------------------------------------------------------------------------
-
-// Time interval between user registration trials
-#define TIMER_INTERVAL_USER_REGISTRATION 1000
-
-// How long time should we wait between each try of initializing the server client (ms)
-#ifdef _DEBUG
-#define TIMER_INTERVAL_SERVER_CLIENT_INIT 10000
-#else
-#define TIMER_INTERVAL_SERVER_CLIENT_INIT 120000
-#endif
-
-// How long time sleep in background thread (ms)
-#define TIMER_THREAD_SLEEP_USER_REGISTRATION 10000
-#define TIMER_THREAD_SLEEP_MAIN_LOOP 60000
#define TIMER_THREAD_SLEEP_TAB_LOOP 10000
-
// Should we to on debug information
#ifdef _DEBUG
#define ENABLE_DEBUG_INFO
@@ -195,8 +121,6 @@
#if (defined PRODUCT_ADBLOCKPLUS)
#define SUPPORT_FILTER
#define SUPPORT_WHITELIST
-#undef SUPPORT_FILE_DOWNLOAD
-#undef SUPPORT_CONFIG
#define SUPPORT_DOM_TRAVERSER
#define SUPPORT_FRAME_CACHING
#endif
@@ -208,13 +132,6 @@
//For debugging production build
//#define ENABLE_DEBUG_INFO
-
-// Max elements in white list menus
-#define DOMAIN_HISTORY_MAX_COUNT 5
-
-// Max registration attempts
-#define REGISTRATION_MAX_ATTEMPTS 5
-
// If defined, we will surround most of the methods with try catch
#undef CATCHALL
@@ -222,52 +139,6 @@
// Otherwise we will try to handle it in a silent way, and only report
#undef THROW_ON_ERROR
-// Should we report errors to the local filesystem and/or to the ad plugin server
-#ifdef ADBLOCKPLUS_PRODUCTION_MODE
-#undef REPORT_ERROR_FILE
-#undef REPORT_ERROR_SERVER
-#else
-#define REPORT_ERROR_FILE
-#define REPORT_ERROR_SERVER
-#endif
-
-// Should we shut down plugin automatically before starting the
-// installer? Remember to change the dictionary POSTDOWNLOADTEXT text
-// to correspond to this behaviour.
-// ex. AUTOMATIC_SHUTDOWN - "If you choose to install the new plugin, you Explorer will close before installation."
-// or NO_AUTOMATIC_SHUTDOWN" - "If you choose to install the new plugin, you have to restart Explorer for the update to take effect"
-#define AUTOMATIC_SHUTDOWN
-
-
-#if (defined PRODUCT_ADBLOCKPLUS)
-//This is used as an agent string for HTTP requests to our servers from the plugin
-#define BHO_NAME _T("Adblock Plus BHO/1.0")
-#endif
-
-// Name of ini file in Windows directory for uninstall
-#if (defined PRODUCT_ADBLOCKPLUS)
-#define UNINSTALL_INI_FILE "AdBlockPlus.ini"
-#endif
-
-// Prefix on temp dir files
-#if (defined PRODUCT_ADBLOCKPLUS)
-#define TEMP_FILE_PREFIX "ab_"
-#endif
-
-#define DICTIONARY_DIR_NAME "Languages\\"
-#define DEFAULT_LANGUAGE "en-US"
-
-// Config filename
-#ifdef SUPPORT_CONFIG
-#define CONFIG_INI_FILE "config.ini"
-#endif
-
-// Install MSI filename
-#if (defined PRODUCT_ADBLOCKPLUS)
-#define INSTALL_MSI_FILE "adblock.msi"
-#define INSTALL_EXE_FILE "Setup.exe"
-#endif
-
// Status bar pane name
#if (defined PRODUCT_ADBLOCKPLUS)
#define STATUSBAR_PANE_NAME "AdblockPlusStatusBarPane"

Powered by Google App Engine
This is Rietveld