| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/devtools/protocol/network_handler.h" | 5 #include "content/browser/devtools/protocol/network_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 | 247 |
| 248 switch (cookie.SameSite()) { | 248 switch (cookie.SameSite()) { |
| 249 case net::CookieSameSite::STRICT_MODE: | 249 case net::CookieSameSite::STRICT_MODE: |
| 250 devtools_cookie->set_same_site(cookie::kSameSiteStrict); | 250 devtools_cookie->set_same_site(cookie::kSameSiteStrict); |
| 251 break; | 251 break; |
| 252 case net::CookieSameSite::LAX_MODE: | 252 case net::CookieSameSite::LAX_MODE: |
| 253 devtools_cookie->set_same_site(cookie::kSameSiteLax); | 253 devtools_cookie->set_same_site(cookie::kSameSiteLax); |
| 254 break; | 254 break; |
| 255 case net::CookieSameSite::NO_RESTRICTION: | 255 case net::CookieSameSite::NO_RESTRICTION: |
| 256 break; | 256 break; |
| 257 case net::CookieSameSite::INVALID_MODE: |
| 258 NOTREACHED(); |
| 259 devtools_cookie->set_same_site(cookie::kSameSiteStrict); |
| 260 break; |
| 257 } | 261 } |
| 258 cookies.push_back(devtools_cookie); | 262 cookies.push_back(devtools_cookie); |
| 259 } | 263 } |
| 260 client_->SendGetCookiesResponse(command_id, | 264 client_->SendGetCookiesResponse(command_id, |
| 261 GetCookiesResponse::Create()->set_cookies(cookies)); | 265 GetCookiesResponse::Create()->set_cookies(cookies)); |
| 262 } | 266 } |
| 263 | 267 |
| 264 Response NetworkHandler::DeleteCookie( | 268 Response NetworkHandler::DeleteCookie( |
| 265 DevToolsCommandId command_id, | 269 DevToolsCommandId command_id, |
| 266 const std::string& cookie_name, | 270 const std::string& cookie_name, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 return Response::InternalError("Could not connect to view"); | 334 return Response::InternalError("Could not connect to view"); |
| 331 WebContents* web_contents = WebContents::FromRenderFrameHost(host_); | 335 WebContents* web_contents = WebContents::FromRenderFrameHost(host_); |
| 332 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( | 336 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( |
| 333 web_contents, certificate_id); | 337 web_contents, certificate_id); |
| 334 return Response::OK(); | 338 return Response::OK(); |
| 335 } | 339 } |
| 336 | 340 |
| 337 } // namespace network | 341 } // namespace network |
| 338 } // namespace devtools | 342 } // namespace devtools |
| 339 } // namespace content | 343 } // namespace content |
| OLD | NEW |