Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 12 matching lines...) Expand all Loading... | |
23 #endif | 23 #endif |
24 #ifdef SUPPORT_CONFIG | 24 #ifdef SUPPORT_CONFIG |
25 int CPluginTabBase::s_configVersion = 0; | 25 int CPluginTabBase::s_configVersion = 0; |
26 #endif | 26 #endif |
27 | 27 |
28 namespace | 28 namespace |
29 { | 29 { |
30 CString ExtractDomain(const CString& url) | 30 CString ExtractDomain(const CString& url) |
31 { | 31 { |
32 int pos = 0; | 32 int pos = 0; |
33 CString scheme = url.Find('/', pos) >= 0 ? url.Tokenize(L"/", pos) : L""; | 33 if (url.Find('/', pos) >= 0) |
34 url.Tokenize(L"/", pos); | |
34 CString domain = url.Tokenize(L"/", pos); | 35 CString domain = url.Tokenize(L"/", pos); |
35 domain.MakeLower(); | 36 domain.MakeLower(); |
36 return domain; | 37 return domain; |
37 } | 38 } |
38 } | 39 } |
39 | 40 |
40 CPluginTabBase::CPluginTabBase(CPluginClass* plugin) : m_plugin(plugin), m_isAct ivated(false) | 41 CPluginTabBase::CPluginTabBase(CPluginClass* plugin) : m_plugin(plugin), m_isAct ivated(false) |
41 { | 42 { |
42 m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter()); | 43 m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter()); |
43 | 44 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
260 { | 261 { |
261 domain = m_documentDomain; | 262 domain = m_documentDomain; |
262 } | 263 } |
263 m_criticalSection.Unlock(); | 264 m_criticalSection.Unlock(); |
264 | 265 |
265 return domain; | 266 return domain; |
266 } | 267 } |
267 | 268 |
268 void CPluginTabBase::SetDocumentUrl(const CString& url) | 269 void CPluginTabBase::SetDocumentUrl(const CString& url) |
269 { | 270 { |
270 CString domain; | 271 CString domain; |
Wladimir Palant
2013/06/25 11:55:13
This variable is unused.
|
Wladimir Palant
2013/06/25 18:03:58
Still unused, feel free to remove while you are at
Felix Dahlke
2013/06/26 09:32:55
Done.
|
271 | 272 |
272 m_criticalSection.Lock(); | 273 m_criticalSection.Lock(); |
273 { | 274 { |
274 m_documentUrl = url; | 275 m_documentUrl = url; |
275 m_documentDomain = ExtractDomain(url); | 276 m_documentDomain = ExtractDomain(url); |
276 | 277 |
277 domain = m_documentDomain; | 278 domain = m_documentDomain; |
278 } | 279 } |
279 m_criticalSection.Unlock(); | 280 m_criticalSection.Unlock(); |
280 } | 281 } |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
446 | 447 |
447 // Non-hanging sleep | 448 // Non-hanging sleep |
448 Sleep(50); | 449 Sleep(50); |
449 } | 450 } |
450 | 451 |
451 tabLoopIteration++; | 452 tabLoopIteration++; |
452 } | 453 } |
453 | 454 |
454 return 0; | 455 return 0; |
455 } | 456 } |
LEFT | RIGHT |