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

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

Issue 5652794446970880: Rely on libadblockplus for domain extraction (Closed)
Patch Set: Use libadblockplus for domain extraction in APP as well Created April 22, 2014, 7:48 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 "PluginClient.h" 3 #include "PluginClient.h"
4 #include "PluginSettings.h" 4 #include "PluginSettings.h"
5 #ifdef SUPPORT_CONFIG 5 #ifdef SUPPORT_CONFIG
6 #include "PluginConfig.h" 6 #include "PluginConfig.h"
7 #endif 7 #endif
8 #include "PluginTab.h" 8 #include "PluginTab.h"
9 #include "PluginDomTraverser.h" 9 #include "PluginDomTraverser.h"
10 #include "PluginClass.h" 10 #include "PluginClass.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 m_criticalSection.Unlock(); 245 m_criticalSection.Unlock();
246 246
247 return domain; 247 return domain;
248 } 248 }
249 249
250 void CPluginTabBase::SetDocumentUrl(const CString& url) 250 void CPluginTabBase::SetDocumentUrl(const CString& url)
251 { 251 {
252 m_criticalSection.Lock(); 252 m_criticalSection.Lock();
253 { 253 {
254 m_documentUrl = url; 254 m_documentUrl = url;
255 m_documentDomain = ExtractDomain(url); 255 m_documentDomain = CString(CAdblockPlusClient::GetInstance()->GetHostFromUrl (url.GetString()).c_str());
256 } 256 }
257 m_criticalSection.Unlock(); 257 m_criticalSection.Unlock();
258 } 258 }
259 259
260 CString CPluginTabBase::GetDocumentUrl() 260 CString CPluginTabBase::GetDocumentUrl()
261 { 261 {
262 CString url; 262 CString url;
263 263
264 m_criticalSection.Lock(); 264 m_criticalSection.Lock();
265 { 265 {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 380
381 // Non-hanging sleep 381 // Non-hanging sleep
382 Sleep(50); 382 Sleep(50);
383 } 383 }
384 384
385 tabLoopIteration++; 385 tabLoopIteration++;
386 } 386 }
387 387
388 return 0; 388 return 0;
389 } 389 }
OLDNEW

Powered by Google App Engine
This is Rietveld