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

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

Issue 11043057: First run page triggering (Closed)
Patch Set: Ditching the statusbarasked Created July 22, 2013, 9:01 a.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 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include <Wbemidl.h> 3 #include <Wbemidl.h>
4 #include <time.h> 4 #include <time.h>
5 #include "PluginSettings.h" 5 #include "PluginSettings.h"
6 #include "PluginClient.h" 6 #include "PluginClient.h"
7 #include "PluginSystem.h" 7 #include "PluginSystem.h"
8 #ifdef SUPPORT_FILTER 8 #ifdef SUPPORT_FILTER
9 #include "PluginFilter.h" 9 #include "PluginFilter.h"
10 #endif 10 #endif
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 s_criticalSectionLocal.Unlock(); 227 s_criticalSectionLocal.Unlock();
228 } 228 }
229 } 229 }
230 bool CPluginSettings::GetPluginEnabled() const 230 bool CPluginSettings::GetPluginEnabled() const
231 { 231 {
232 //TODO: Query AdblockPlusEngine 232 //TODO: Query AdblockPlusEngine
233 return m_isPluginEnabledTab; 233 return m_isPluginEnabledTab;
234 } 234 }
235 235
236 bool CPluginSettings::GetStatusBarAsked()
237 {
238 return CPluginClient::GetInstance()->GetPref(L"statusbarasked", false);
239 }
240
241 void CPluginSettings::SetStatusBarAsked()
242 {
243 CPluginClient::GetInstance()->SetPref(L"statusbarasked", true);
244 }
245
246 236
247 void CPluginSettings::AddError(const CString& error, const CString& errorCode) 237 void CPluginSettings::AddError(const CString& error, const CString& errorCode)
248 { 238 {
249 DEBUG_SETTINGS(L"SettingsTab::AddError error:" + error + " code:" + errorCode) 239 DEBUG_SETTINGS(L"SettingsTab::AddError error:" + error + " code:" + errorCode)
250 } 240 }
251 241
252 242
253 // ============================================================================ 243 // ============================================================================
254 // Whitelist settings 244 // Whitelist settings
255 // ============================================================================ 245 // ============================================================================
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstanc e()->GetListedSubscriptions(); 360 std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstanc e()->GetListedSubscriptions();
371 if (subscriptions.size() > 0) 361 if (subscriptions.size() > 0)
372 return CString(subscriptions.front().url.c_str()); 362 return CString(subscriptions.front().url.c_str());
373 else 363 else
374 return CString(L""); 364 return CString(L"");
375 } 365 }
376 366
377 367
378 368
379 #endif // SUPPORT_WHITELIST 369 #endif // SUPPORT_WHITELIST
OLDNEW

Powered by Google App Engine
This is Rietveld