| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Implements the Chrome Extensions Cookies API. | 5 // Implements the Chrome Extensions Cookies API. |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/cookies/cookies_api.h" | 7 #include "chrome/browser/extensions/api/cookies/cookies_api.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 : std::string(), | 399 : std::string(), |
| 400 parsed_args_->details.value.get() ? *parsed_args_->details.value | 400 parsed_args_->details.value.get() ? *parsed_args_->details.value |
| 401 : std::string(), | 401 : std::string(), |
| 402 parsed_args_->details.domain.get() ? *parsed_args_->details.domain | 402 parsed_args_->details.domain.get() ? *parsed_args_->details.domain |
| 403 : std::string(), | 403 : std::string(), |
| 404 parsed_args_->details.path.get() ? *parsed_args_->details.path | 404 parsed_args_->details.path.get() ? *parsed_args_->details.path |
| 405 : std::string(), | 405 : std::string(), |
| 406 base::Time(), | 406 base::Time(), |
| 407 expiration_time, | 407 expiration_time, |
| 408 base::Time(), | 408 base::Time(), |
| 409 parsed_args_->details.secure.get() ? *parsed_args_->details.secure.get() | 409 parsed_args_->details.secure.get() ? *parsed_args_->details.secure |
| 410 : false, | 410 : false, |
| 411 parsed_args_->details.http_only.get() ? *parsed_args_->details.http_only | 411 parsed_args_->details.http_only.get() ? *parsed_args_->details.http_only |
| 412 : false, | 412 : false, |
| 413 same_site, | 413 same_site, |
| 414 are_experimental_cookie_features_enabled, | 414 are_experimental_cookie_features_enabled, |
| 415 net::COOKIE_PRIORITY_DEFAULT, | 415 net::COOKIE_PRIORITY_DEFAULT, |
| 416 base::Bind(&CookiesSetFunction::PullCookie, this)); | 416 base::Bind(&CookiesSetFunction::PullCookie, this)); |
| 417 // clang-format on | 417 // clang-format on |
| 418 } | 418 } |
| 419 | 419 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 BrowserContextKeyedAPIFactory<CookiesAPI>* CookiesAPI::GetFactoryInstance() { | 585 BrowserContextKeyedAPIFactory<CookiesAPI>* CookiesAPI::GetFactoryInstance() { |
| 586 return g_factory.Pointer(); | 586 return g_factory.Pointer(); |
| 587 } | 587 } |
| 588 | 588 |
| 589 void CookiesAPI::OnListenerAdded(const EventListenerInfo& details) { | 589 void CookiesAPI::OnListenerAdded(const EventListenerInfo& details) { |
| 590 cookies_event_router_.reset(new CookiesEventRouter(browser_context_)); | 590 cookies_event_router_.reset(new CookiesEventRouter(browser_context_)); |
| 591 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 591 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
| 592 } | 592 } |
| 593 | 593 |
| 594 } // namespace extensions | 594 } // namespace extensions |
| OLD | NEW |