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

Unified Diff: src/plugin/AdblockPlusClient.h

Issue 11013110: Cleanup (Closed)
Patch Set: SetPref/GetPref type safety. Comments addressed. Created July 22, 2013, 12:42 a.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/AdblockPlusClient.h
===================================================================
--- a/src/plugin/AdblockPlusClient.h
+++ b/src/plugin/AdblockPlusClient.h
@@ -4,6 +4,7 @@
#include "PluginTypedef.h"
#include "PluginClientBase.h"
+#include "../shared/Communication.h"
class CPluginFilter;
@@ -32,6 +33,9 @@
// Private constructor used by the singleton pattern
CAdblockPlusClient();
+ void PostRequest(Communication::OutputBuffer request);
+ Communication::InputBuffer FetchResponse(const std::wstring& name);
+
public:
static CAdblockPlusClient* s_instance;
@@ -59,7 +63,13 @@
void AddFilter(const std::wstring& text);
void RemoveFilter(const std::wstring& text);
void SetPref(const std::wstring& name, const std::wstring& value);
- std::wstring GetPref(const std::wstring& name);
+ void SetPref(const std::string& name, const std::string& value);
+ void SetPref(const std::wstring& name, const int64_t& value);
+ void SetPref(const std::wstring& name, bool value);
+ std::wstring GetPref(const std::wstring& name, const std::wstring& defaultValue = L"");
+ std::wstring GetPref(const std::wstring& name, LPCWSTR defaultValue);
+ bool GetPref(const std::wstring& name, bool defaultValue = false);
+ int64_t GetPref(const std::wstring& name, int64_t defaultValue = 0);
};
#endif // _ADBLOCK_PLUS_CLIENT_H_

Powered by Google App Engine
This is Rietveld