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 #include "content/renderer/npapi/webplugin_impl.h" | 5 #include "content/renderer/npapi/webplugin_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 const GURL& first_party_for_cookies) { | 766 const GURL& first_party_for_cookies) { |
767 if (!render_view_.get()) | 767 if (!render_view_.get()) |
768 return std::string(); | 768 return std::string(); |
769 | 769 |
770 WebCookieJar* cookie_jar = render_frame_->cookie_jar(); | 770 WebCookieJar* cookie_jar = render_frame_->cookie_jar(); |
771 if (!cookie_jar) { | 771 if (!cookie_jar) { |
772 DLOG(WARNING) << "No cookie jar!"; | 772 DLOG(WARNING) << "No cookie jar!"; |
773 return std::string(); | 773 return std::string(); |
774 } | 774 } |
775 | 775 |
776 return UTF16ToUTF8(cookie_jar->cookies(url, first_party_for_cookies)); | 776 return base::UTF16ToUTF8(cookie_jar->cookies(url, first_party_for_cookies)); |
777 } | 777 } |
778 | 778 |
779 void WebPluginImpl::URLRedirectResponse(bool allow, int resource_id) { | 779 void WebPluginImpl::URLRedirectResponse(bool allow, int resource_id) { |
780 for (size_t i = 0; i < clients_.size(); ++i) { | 780 for (size_t i = 0; i < clients_.size(); ++i) { |
781 if (clients_[i].id == static_cast<unsigned long>(resource_id)) { | 781 if (clients_[i].id == static_cast<unsigned long>(resource_id)) { |
782 if (clients_[i].loader.get()) { | 782 if (clients_[i].loader.get()) { |
783 if (allow) { | 783 if (allow) { |
784 clients_[i].loader->setDefersLoading(false); | 784 clients_[i].loader->setDefersLoading(false); |
785 } else { | 785 } else { |
786 clients_[i].loader->cancel(); | 786 clients_[i].loader->cancel(); |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1501 case PLUGIN_SRC: | 1501 case PLUGIN_SRC: |
1502 webframe_->setReferrerForRequest(*request, plugin_url_); | 1502 webframe_->setReferrerForRequest(*request, plugin_url_); |
1503 break; | 1503 break; |
1504 | 1504 |
1505 default: | 1505 default: |
1506 break; | 1506 break; |
1507 } | 1507 } |
1508 } | 1508 } |
1509 | 1509 |
1510 } // namespace content | 1510 } // namespace content |
OLD | NEW |