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

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

Issue 4895405913407488: Issue #1234 - remove CString from declarations representing domains. (Closed)
Patch Set: Created Aug. 7, 2014, 7:46 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
« no previous file with comments | « src/plugin/PluginClientBase.h ('k') | src/plugin/PluginDebug.h » ('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 // Internet / FTP 3 // Internet / FTP
4 #include <wininet.h> 4 #include <wininet.h>
5 5
6 // IP adapter 6 // IP adapter
7 #include <iphlpapi.h> 7 #include <iphlpapi.h>
8 8
9 #include "PluginSettings.h" 9 #include "PluginSettings.h"
10 #include "PluginSystem.h" 10 #include "PluginSystem.h"
(...skipping 22 matching lines...) Expand all
33 CPluginClientBase::CPluginClientBase() 33 CPluginClientBase::CPluginClientBase()
34 { 34 {
35 } 35 }
36 36
37 37
38 CPluginClientBase::~CPluginClientBase() 38 CPluginClientBase::~CPluginClientBase()
39 { 39 {
40 } 40 }
41 41
42 42
43 bool CPluginClientBase::IsValidDomain(const CString& domain)
44 {
45 return domain != L"about:blank" &&
46 domain != L"about:tabs" &&
47 domain.Find(L"javascript:") != 0 &&
48 !domain.IsEmpty();
49 }
50
51
52 CString& CPluginClientBase::UnescapeUrl(CString& url) 43 CString& CPluginClientBase::UnescapeUrl(CString& url)
53 { 44 {
54 CString unescapedUrl; 45 CString unescapedUrl;
55 DWORD cb = 2048; 46 DWORD cb = 2048;
56 47
57 if (SUCCEEDED(::UrlUnescape(url.GetBuffer(), unescapedUrl.GetBufferSetLength(c b), &cb, 0))) 48 if (SUCCEEDED(::UrlUnescape(url.GetBuffer(), unescapedUrl.GetBufferSetLength(c b), &cb, 0)))
58 { 49 {
59 unescapedUrl.ReleaseBuffer(); 50 unescapedUrl.ReleaseBuffer();
60 unescapedUrl.Truncate(cb); 51 unescapedUrl.Truncate(cb);
61 52
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 141
151 hasError = true; 142 hasError = true;
152 143
153 s_pluginErrors.erase(it); 144 s_pluginErrors.erase(it);
154 } 145 }
155 } 146 }
156 s_criticalSectionLocal.Unlock(); 147 s_criticalSectionLocal.Unlock();
157 148
158 return hasError; 149 return hasError;
159 } 150 }
OLDNEW
« no previous file with comments | « src/plugin/PluginClientBase.h ('k') | src/plugin/PluginDebug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld