| 243 | } |
| 244 | |
| 245 | bool 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 | |
| 265 | bool CookieManager::RecurseCookieDomain(const std::string& url, |
| 266 | const BrowserCookie& cookie) { |
no test coverage detected