| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <vector> | 5 #include <vector> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <cstdio> | 7 #include <cstdio> |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 VisitedLinkEventListener* event_listener_; | 489 VisitedLinkEventListener* event_listener_; |
| 490 scoped_ptr<VisitedLinkMaster> visited_link_master_; | 490 scoped_ptr<VisitedLinkMaster> visited_link_master_; |
| 491 }; | 491 }; |
| 492 | 492 |
| 493 // Stub out as little as possible, borrowing from BrowserRenderProcessHost. | 493 // Stub out as little as possible, borrowing from BrowserRenderProcessHost. |
| 494 class VisitRelayingRenderProcessHost : public BrowserRenderProcessHost { | 494 class VisitRelayingRenderProcessHost : public BrowserRenderProcessHost { |
| 495 public: | 495 public: |
| 496 explicit VisitRelayingRenderProcessHost(Profile* profile) | 496 explicit VisitRelayingRenderProcessHost(Profile* profile) |
| 497 : BrowserRenderProcessHost(profile) { | 497 : BrowserRenderProcessHost(profile) { |
| 498 NotificationService::current()->Notify( | 498 NotificationService::current()->Notify( |
| 499 NotificationType::RENDERER_PROCESS_CREATED, | 499 content::NOTIFICATION_RENDERER_PROCESS_CREATED, |
| 500 Source<RenderProcessHost>(this), NotificationService::NoDetails()); | 500 Source<RenderProcessHost>(this), NotificationService::NoDetails()); |
| 501 } | 501 } |
| 502 virtual ~VisitRelayingRenderProcessHost() { | 502 virtual ~VisitRelayingRenderProcessHost() { |
| 503 NotificationService::current()->Notify( | 503 NotificationService::current()->Notify( |
| 504 NotificationType::RENDERER_PROCESS_TERMINATED, | 504 content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, |
| 505 Source<RenderProcessHost>(this), NotificationService::NoDetails()); | 505 Source<RenderProcessHost>(this), NotificationService::NoDetails()); |
| 506 } | 506 } |
| 507 | 507 |
| 508 virtual bool Init(bool is_accessibility_enabled) { | 508 virtual bool Init(bool is_accessibility_enabled) { |
| 509 return true; | 509 return true; |
| 510 } | 510 } |
| 511 | 511 |
| 512 virtual void CancelResourceRequests(int render_widget_id) { | 512 virtual void CancelResourceRequests(int render_widget_id) { |
| 513 } | 513 } |
| 514 | 514 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 EXPECT_EQ(1, profile()->add_event_count()); | 717 EXPECT_EQ(1, profile()->add_event_count()); |
| 718 EXPECT_EQ(0, profile()->reset_event_count()); | 718 EXPECT_EQ(0, profile()->reset_event_count()); |
| 719 | 719 |
| 720 // Activate the tab. | 720 // Activate the tab. |
| 721 rvh()->WasRestored(); | 721 rvh()->WasRestored(); |
| 722 | 722 |
| 723 // We should have only one more reset event. | 723 // We should have only one more reset event. |
| 724 EXPECT_EQ(1, profile()->add_event_count()); | 724 EXPECT_EQ(1, profile()->add_event_count()); |
| 725 EXPECT_EQ(1, profile()->reset_event_count()); | 725 EXPECT_EQ(1, profile()->reset_event_count()); |
| 726 } | 726 } |
| OLD | NEW |