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

Side by Side Diff: src/plugin/PluginSettings.h

Issue 5750789393874944: [IE] First round of ATL removal (Closed)
Patch Set: Created June 20, 2014, 9:22 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
OLDNEW
1 /** 1 /**
2 * This class contains all client functionality of the IE plugin 2 * This class contains all client functionality of the IE plugin
3 * 3 *
4 * Exception errors are tested by calls to ExceptionsTest from: Main ... 4 * Exception errors are tested by calls to ExceptionsTest from: Main ...
5 */ 5 */
6 6
7 #ifndef _PLUGIN_SETTINGS_H_ 7 #ifndef _PLUGIN_SETTINGS_H_
8 #define _PLUGIN_SETTINGS_H_ 8 #define _PLUGIN_SETTINGS_H_
9 9
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 CPluginSettings(); 63 CPluginSettings();
64 public: 64 public:
65 65
66 ~CPluginSettings(); 66 ~CPluginSettings();
67 67
68 static CPluginSettings* s_instance; 68 static CPluginSettings* s_instance;
69 69
70 static bool HasInstance(); 70 static bool HasInstance();
71 static CPluginSettings* GetInstance(); 71 static CPluginSettings* GetInstance();
72 72
73 static CString GetDataPath(const CString& filename=L""); 73 /**
74 * A fully qualified path name in the application data directory, given only t he file name.
75 */
76 static std::wstring GetDataPath(const std::wstring & filename=L"");
74 77
75 bool IsPluginEnabled() const; 78 bool IsPluginEnabled() const;
76 79
77 std::map<CString, CString> GetFilterLanguageTitleList() const; 80 std::map< std::wstring, std::wstring > GetFilterLanguageTitleList() const;
78 81
79 void SetWorkingThreadId(); 82 void SetWorkingThreadId();
80 void SetWorkingThreadId(DWORD id); 83 void SetWorkingThreadId(DWORD id);
81 bool IsWorkingThread(DWORD dwThread=0) const; 84 bool IsWorkingThread(DWORD dwThread=0) const;
82 85
83 static CString GetSystemLanguage(); 86 static std::wstring GetSystemLanguage();
84 DWORD m_WindowsBuildNumber; 87 DWORD m_WindowsBuildNumber;
85 88
86 public: 89 public:
87 90
88 void TogglePluginEnabled(); 91 void TogglePluginEnabled();
89 bool GetPluginEnabled() const; 92 bool GetPluginEnabled() const;
90 93
91 void AddError(const CString& error, const CString& errorCode); 94 void AddError(const std::wstring & error, const std::wstring & errorCode);
92 95
93 // Settings whitelist 96 // Settings whitelist
94 #ifdef SUPPORT_WHITELIST 97 #ifdef SUPPORT_WHITELIST
95 98
96 private: 99 private:
97 std::vector<std::wstring> m_whitelistedDomains; 100 std::vector<std::wstring> m_whitelistedDomains;
98 101
99 void ClearWhitelist(); 102 void ClearWhitelist();
100 bool ReadWhitelist(bool bDebug=true); 103 bool ReadWhitelist(bool bDebug=true);
101 104
102 public: 105 public:
103 void AddWhiteListedDomain(const CString& domain); 106 void AddWhiteListedDomain(const std::wstring & domain);
104 void RemoveWhiteListedDomain(const CString& domain); 107 void RemoveWhiteListedDomain(const std::wstring & domain);
105 int GetWhiteListedDomainCount() const; 108 int GetWhiteListedDomainCount() const;
106 std::vector<std::wstring> GetWhiteListedDomainList(); 109 std::vector<std::wstring> GetWhiteListedDomainList();
107 #endif //SUPPORT_WHITELIST 110 #endif //SUPPORT_WHITELIST
108 111
109 bool RefreshWhitelist(); 112 bool RefreshWhitelist();
110 DWORD GetWindowsBuildNumber(); 113 DWORD GetWindowsBuildNumber();
111 114
112 void SetSubscription(const std::wstring& url); 115 void SetSubscription(const std::wstring& url);
113 void SetDefaultSubscription(); 116 void SetDefaultSubscription();
114 CString GetSubscription(); 117 std::wstring GetSubscription();
115 CString GetAppLocale(); 118 std::wstring GetAppLocale();
116 CString GetDocumentationLink(); 119 std::wstring GetDocumentationLink();
117 }; 120 };
118 121
119 122
120 #endif // _PLUGIN_SETTINGS_H_ 123 #endif // _PLUGIN_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld