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

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

Issue 685553002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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
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 5
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/test/test_simple_task_runner.h" 9 #include "base/test/test_simple_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 'e', 'f', 'g', 'h' // 4-byte prefix 65 'e', 'f', 'g', 'h' // 4-byte prefix
66 }; 66 };
67 const std::string kChunkPayload2(kRawChunkPayload2, sizeof(kRawChunkPayload2)); 67 const std::string kChunkPayload2(kRawChunkPayload2, sizeof(kRawChunkPayload2));
68 68
69 } // namespace 69 } // namespace
70 70
71 class SafeBrowsingProtocolManagerTest : public testing::Test { 71 class SafeBrowsingProtocolManagerTest : public testing::Test {
72 protected: 72 protected:
73 std::string key_param_; 73 std::string key_param_;
74 74
75 virtual void SetUp() { 75 void SetUp() override {
76 std::string key = google_apis::GetAPIKey(); 76 std::string key = google_apis::GetAPIKey();
77 if (!key.empty()) { 77 if (!key.empty()) {
78 key_param_ = base::StringPrintf( 78 key_param_ = base::StringPrintf(
79 "&key=%s", 79 "&key=%s",
80 net::EscapeQueryParamValue(key, true).c_str()); 80 net::EscapeQueryParamValue(key, true).c_str());
81 } 81 }
82 } 82 }
83 83
84 scoped_ptr<SafeBrowsingProtocolManager> CreateProtocolManager( 84 scoped_ptr<SafeBrowsingProtocolManager> CreateProtocolManager(
85 SafeBrowsingProtocolManagerDelegate* delegate) { 85 SafeBrowsingProtocolManagerDelegate* delegate) {
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 second_chunk_url_fetcher->delegate()->OnURLFetchComplete( 1126 second_chunk_url_fetcher->delegate()->OnURLFetchComplete(
1127 second_chunk_url_fetcher); 1127 second_chunk_url_fetcher);
1128 1128
1129 EXPECT_FALSE(pm->IsUpdateScheduled()); 1129 EXPECT_FALSE(pm->IsUpdateScheduled());
1130 1130
1131 // Invoke the AddChunksCallback to finish the update. 1131 // Invoke the AddChunksCallback to finish the update.
1132 runner->RunPendingTasks(); 1132 runner->RunPendingTasks();
1133 1133
1134 EXPECT_TRUE(pm->IsUpdateScheduled()); 1134 EXPECT_TRUE(pm->IsUpdateScheduled());
1135 } 1135 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698