MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / RecurseCookiePath

Method RecurseCookiePath

cpp/iedriver/CookieManager.cpp:245–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245bool CookieManager::RecurseCookiePath(const std::string& url,
246 const BrowserCookie& cookie) {
247 size_t number_of_characters = 0;
248 size_t slash_index = cookie.path().find_last_of('/');
249 size_t final_index = cookie.path().size() - 1;
250 if (slash_index == final_index) {
251 number_of_characters = slash_index;
252 }
253 else {
254 number_of_characters = slash_index + 1;
255 }
256
257 if (slash_index != std::string::npos) {
258 BrowserCookie path_cookie = cookie.Copy();
259 path_cookie.set_path(cookie.path().substr(0, number_of_characters));
260 bool deleted = this->RecurseCookiePath(url, path_cookie);
261 }
262 return this->RecurseCookieDomain(url, cookie);
263}
264
265bool CookieManager::RecurseCookieDomain(const std::string& url,
266 const BrowserCookie& cookie) {

Callers 1

Calls 5

RecurseCookieDomainMethod · 0.95
set_pathMethod · 0.80
pathMethod · 0.45
sizeMethod · 0.45
CopyMethod · 0.45

Tested by

no test coverage detected