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

Side by Side Diff: Shared/PluginClassThread.cpp

Issue 8978054: Removal of shareware parts (Closed)
Patch Set: Created Dec. 5, 2012, 7:59 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
« no previous file with comments | « Shared/PluginClass.cpp ('k') | Shared/PluginConfiguration.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include <ctime> 3 #include <ctime>
4 4
5 #include "PluginClass.h" 5 #include "PluginClass.h"
6 #include "PluginDictionary.h" 6 #include "PluginDictionary.h"
7 #include "PluginSettings.h" 7 #include "PluginSettings.h"
8 #include "PluginSystem.h" 8 #include "PluginSystem.h"
9 #include "PluginConfiguration.h" 9 #include "PluginConfiguration.h"
10 #ifdef SUPPORT_FILTER 10 #ifdef SUPPORT_FILTER
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 bool isNewFilterVersion = false; 300 bool isNewFilterVersion = false;
301 #endif 301 #endif
302 #ifdef SUPPORT_CONFIG 302 #ifdef SUPPORT_CONFIG
303 bool isNewConfig = false; 303 bool isNewConfig = false;
304 #endif 304 #endif
305 305
306 DEBUG_THREAD("Thread::Update settings (action)"); 306 DEBUG_THREAD("Thread::Update settings (action)");
307 307
308 settings->ForceConfigurationUpdateOnStart(false); 308 settings->ForceConfigurationUpdateOnStart(false);
309 309
310 if (configuration->IsValidPluginExpired())
311 {
312 settings->SetBool(SETTING_PLUGIN_EXPIRED, configuration->IsP luginExpired());
313 }
314
315 if (configuration->IsValidUserId()) 310 if (configuration->IsValidUserId())
316 { 311 {
317 settings->SetString(SETTING_USER_ID, configu ration->GetUserId()); 312 settings->SetString(SETTING_USER_ID, configu ration->GetUserId());
318 } 313 }
319 314
320 if (configuration->IsValidPluginUpdate() && configur ation->GetPluginUpdateVersion() != IEPLUGIN_VERSION) 315 if (configuration->IsValidPluginUpdate() && configur ation->GetPluginUpdateVersion() != IEPLUGIN_VERSION)
321 { 316 {
322 settings->SetString(SETTING_PLUGIN_UPDATE_URL, configuration ->GetPluginUpdateUrl()); 317 settings->SetString(SETTING_PLUGIN_UPDATE_URL, configuration ->GetPluginUpdateUrl());
323 settings->SetString(SETTING_PLUGIN_UPDATE_VERSION, configura tion->GetPluginUpdateVersion()); 318 settings->SetString(SETTING_PLUGIN_UPDATE_VERSION, configura tion->GetPluginUpdateVersion());
324 } 319 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 375
381 if (newPluginId != settings->GetString(SETTING_PLUGIN_ID)) 376 if (newPluginId != settings->GetString(SETTING_PLUGIN_ID))
382 { 377 {
383 DEBUG_GENERAL(L"*** pluginId has changed from " + settings-> GetString(SETTING_PLUGIN_ID) + CString(L" to ") + newPluginId) 378 DEBUG_GENERAL(L"*** pluginId has changed from " + settings-> GetString(SETTING_PLUGIN_ID) + CString(L" to ") + newPluginId)
384 379
385 settings->SetString(SETTING_PLUGIN_ID, newPluginId); 380 settings->SetString(SETTING_PLUGIN_ID, newPluginId);
386 } 381 }
387 382
388 settings->SetString(SETTING_REG_SUCCEEDED, "true"); 383 settings->SetString(SETTING_REG_SUCCEEDED, "true");
389 384
390 settings->SetBool(SETTING_PLUGIN_REGISTRATION, c onfiguration->IsPluginRegistered());
391 #ifdef PRODUCT_SIMPLEADBLOCK
392 settings->SetValue(SETTING_PLUGIN_ADBLOCKLIMIT, configuration->GetAdBlockLimit());
393 #endif
394 settings->Write(); 385 settings->Write();
395 386
396 configuration->Invalidate(); 387 configuration->Invalidate();
397 388
398 // Update dictionary 389 // Update dictionary
399 if (isNewDictionaryVersion) 390 if (isNewDictionaryVersion)
400 { 391 {
401 CPluginDictionary* dictionary = CPluginD ictionary::GetInstance(); 392 CPluginDictionary* dictionary = CPluginD ictionary::GetInstance();
402 393
403 if (dictionary->Download(configuration->GetDictionaryUrl(), CPluginSettings::GetDataPath(DICTIONARY_INI_FILE))) 394 if (dictionary->Download(configuration->GetDictionaryUrl(), CPluginSettings::GetDataPath(DICTIONARY_INI_FILE)))
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 bool isDone = false; 575 bool isDone = false;
585 576
586 s_criticalSectionLocal.Lock(); 577 s_criticalSectionLocal.Lock();
587 { 578 {
588 isDone = s_isMainThreadDone || mainThread != s_hMainThread; 579 isDone = s_isMainThreadDone || mainThread != s_hMainThread;
589 } 580 }
590 s_criticalSectionLocal.Unlock(); 581 s_criticalSectionLocal.Unlock();
591 582
592 return isDone; 583 return isDone;
593 } 584 }
OLDNEW
« no previous file with comments | « Shared/PluginClass.cpp ('k') | Shared/PluginConfiguration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld