| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 digests_of_uris_of_serialized_resources_( | 740 digests_of_uris_of_serialized_resources_( |
| 741 digests_of_uris_of_serialized_resources) { | 741 digests_of_uris_of_serialized_resources) { |
| 742 DCHECK(digests_of_uris_of_serialized_resources_); | 742 DCHECK(digests_of_uris_of_serialized_resources_); |
| 743 } | 743 } |
| 744 | 744 |
| 745 bool shouldSkipResource(const WebURL& url) override { | 745 bool shouldSkipResource(const WebURL& url) override { |
| 746 std::string digest = | 746 std::string digest = |
| 747 crypto::SHA256HashString(params_.salt + GURL(url).spec()); | 747 crypto::SHA256HashString(params_.salt + GURL(url).spec()); |
| 748 | 748 |
| 749 // Skip if the |url| already covered by serialization of an *earlier* frame. | 749 // Skip if the |url| already covered by serialization of an *earlier* frame. |
| 750 if (ContainsKey(params_.digests_of_uris_to_skip, digest)) | 750 if (base::ContainsKey(params_.digests_of_uris_to_skip, digest)) |
| 751 return true; | 751 return true; |
| 752 | 752 |
| 753 // Let's record |url| as being serialized for the *current* frame. | 753 // Let's record |url| as being serialized for the *current* frame. |
| 754 auto pair = digests_of_uris_of_serialized_resources_->insert(digest); | 754 auto pair = digests_of_uris_of_serialized_resources_->insert(digest); |
| 755 bool insertion_took_place = pair.second; | 755 bool insertion_took_place = pair.second; |
| 756 DCHECK(insertion_took_place); // Blink should dedupe within a frame. | 756 DCHECK(insertion_took_place); // Blink should dedupe within a frame. |
| 757 | 757 |
| 758 return false; | 758 return false; |
| 759 } | 759 } |
| 760 | 760 |
| (...skipping 5554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6315 // event target. Potentially a Pepper plugin will receive the event. | 6315 // event target. Potentially a Pepper plugin will receive the event. |
| 6316 // In order to tell whether a plugin gets the last mouse event and which it | 6316 // In order to tell whether a plugin gets the last mouse event and which it |
| 6317 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6317 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6318 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6318 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6319 // |pepper_last_mouse_event_target_|. | 6319 // |pepper_last_mouse_event_target_|. |
| 6320 pepper_last_mouse_event_target_ = nullptr; | 6320 pepper_last_mouse_event_target_ = nullptr; |
| 6321 #endif | 6321 #endif |
| 6322 } | 6322 } |
| 6323 | 6323 |
| 6324 } // namespace content | 6324 } // namespace content |
| OLD | NEW |