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

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

Issue 629603002: replace OVERRIDE and FINAL with override and final in chrome/browser/[r-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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
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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 MOCK_METHOD1(GetChunks, void(GetChunksCallback)); 323 MOCK_METHOD1(GetChunks, void(GetChunksCallback));
324 324
325 // gmock does not work with scoped_ptr<> at this time. Add a local method to 325 // gmock does not work with scoped_ptr<> at this time. Add a local method to
326 // mock, then call that from an override. Beware of object ownership when 326 // mock, then call that from an override. Beware of object ownership when
327 // making changes here. 327 // making changes here.
328 MOCK_METHOD3(AddChunksRaw, void(const std::string& lists, 328 MOCK_METHOD3(AddChunksRaw, void(const std::string& lists,
329 const ScopedVector<SBChunkData>& chunks, 329 const ScopedVector<SBChunkData>& chunks,
330 AddChunksCallback)); 330 AddChunksCallback));
331 virtual void AddChunks(const std::string& list, 331 virtual void AddChunks(const std::string& list,
332 scoped_ptr<ScopedVector<SBChunkData> > chunks, 332 scoped_ptr<ScopedVector<SBChunkData> > chunks,
333 AddChunksCallback callback) OVERRIDE { 333 AddChunksCallback callback) override {
334 AddChunksRaw(list, *chunks, callback); 334 AddChunksRaw(list, *chunks, callback);
335 } 335 }
336 336
337 // TODO(shess): Actually test this case somewhere. 337 // TODO(shess): Actually test this case somewhere.
338 MOCK_METHOD1(DeleteChunksRaw, 338 MOCK_METHOD1(DeleteChunksRaw,
339 void(const std::vector<SBChunkDelete>& chunk_deletes)); 339 void(const std::vector<SBChunkDelete>& chunk_deletes));
340 virtual void DeleteChunks( 340 virtual void DeleteChunks(
341 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) OVERRIDE{ 341 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) override{
342 DeleteChunksRaw(*chunk_deletes); 342 DeleteChunksRaw(*chunk_deletes);
343 } 343 }
344 }; 344 };
345 345
346 // |InvokeGetChunksCallback| is required because GMock's InvokeArgument action 346 // |InvokeGetChunksCallback| is required because GMock's InvokeArgument action
347 // expects to use operator(), and a Callback only provides Run(). 347 // expects to use operator(), and a Callback only provides Run().
348 // TODO(cbentzel): Use ACTION or ACTION_TEMPLATE instead? 348 // TODO(cbentzel): Use ACTION or ACTION_TEMPLATE instead?
349 void InvokeGetChunksCallback( 349 void InvokeGetChunksCallback(
350 const std::vector<SBListChunkRanges>& ranges, 350 const std::vector<SBListChunkRanges>& ranges,
351 bool database_error, 351 bool database_error,
(...skipping 774 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
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager.cc ('k') | chrome/browser/safe_browsing/safe_browsing_blocking_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698