Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc

Issue 10068036: RefCounted types should not have public destructors, chrome/browser/ part 5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win fix Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/prefs/pref_service.h" 5 #include "chrome/browser/prefs/pref_service.h"
6 #include "chrome/browser/profiles/profile.h" 6 #include "chrome/browser/profiles/profile.h"
7 #include "chrome/browser/safe_browsing/malware_details.h" 7 #include "chrome/browser/safe_browsing/malware_details.h"
8 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" 8 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
9 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 10 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
(...skipping 29 matching lines...) Expand all
40 malware_details_proceed_delay_ms_ = 0; 40 malware_details_proceed_delay_ms_ = 0;
41 41
42 // Don't create a view. 42 // Don't create a view.
43 interstitial_page_->DontCreateViewForTesting(); 43 interstitial_page_->DontCreateViewForTesting();
44 } 44 }
45 45
46 }; 46 };
47 47
48 class TestSafeBrowsingService: public SafeBrowsingService { 48 class TestSafeBrowsingService: public SafeBrowsingService {
49 public: 49 public:
50 virtual ~TestSafeBrowsingService() {}
51
52 virtual void SendSerializedMalwareDetails(const std::string& serialized) { 50 virtual void SendSerializedMalwareDetails(const std::string& serialized) {
53 details_.push_back(serialized); 51 details_.push_back(serialized);
54 } 52 }
55 53
56 std::list<std::string>* GetDetails() { 54 std::list<std::string>* GetDetails() {
57 return &details_; 55 return &details_;
58 } 56 }
59 57
58 private:
59 virtual ~TestSafeBrowsingService() {}
60
60 std::list<std::string> details_; 61 std::list<std::string> details_;
61 }; 62 };
62 63
63 class TestSafeBrowsingBlockingPageFactory 64 class TestSafeBrowsingBlockingPageFactory
64 : public SafeBrowsingBlockingPageFactory { 65 : public SafeBrowsingBlockingPageFactory {
65 public: 66 public:
66 TestSafeBrowsingBlockingPageFactory() { } 67 TestSafeBrowsingBlockingPageFactory() { }
67 ~TestSafeBrowsingBlockingPageFactory() { } 68 ~TestSafeBrowsingBlockingPageFactory() { }
68 69
69 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( 70 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage(
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 627
627 EXPECT_TRUE(profile->GetPrefs()->GetBoolean( 628 EXPECT_TRUE(profile->GetPrefs()->GetBoolean(
628 prefs::kSafeBrowsingReportingEnabled)); 629 prefs::kSafeBrowsingReportingEnabled));
629 630
630 // Simulate the user uncheck the report agreement checkbox. 631 // Simulate the user uncheck the report agreement checkbox.
631 sb_interstitial->SetReportingPreference(false); 632 sb_interstitial->SetReportingPreference(false);
632 633
633 EXPECT_FALSE(profile->GetPrefs()->GetBoolean( 634 EXPECT_FALSE(profile->GetPrefs()->GetBoolean(
634 prefs::kSafeBrowsingReportingEnabled)); 635 prefs::kSafeBrowsingReportingEnabled));
635 } 636 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698