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

Side by Side Diff: chrome/browser/extensions/menu_manager_unittest.cc

Issue 666153002: Standardize usage of virtual/override/final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 #include <vector> 5 #include <vector>
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 private: 481 private:
482 DISALLOW_COPY_AND_ASSIGN(MockEventRouter); 482 DISALLOW_COPY_AND_ASSIGN(MockEventRouter);
483 }; 483 };
484 484
485 // A mock ExtensionSystem to serve our MockEventRouter. 485 // A mock ExtensionSystem to serve our MockEventRouter.
486 class MockExtensionSystem : public TestExtensionSystem { 486 class MockExtensionSystem : public TestExtensionSystem {
487 public: 487 public:
488 explicit MockExtensionSystem(Profile* profile) 488 explicit MockExtensionSystem(Profile* profile)
489 : TestExtensionSystem(profile) {} 489 : TestExtensionSystem(profile) {}
490 490
491 virtual EventRouter* event_router() override { 491 EventRouter* event_router() override {
492 if (!mock_event_router_) 492 if (!mock_event_router_)
493 mock_event_router_.reset(new MockEventRouter(profile_)); 493 mock_event_router_.reset(new MockEventRouter(profile_));
494 return mock_event_router_.get(); 494 return mock_event_router_.get();
495 } 495 }
496 496
497 private: 497 private:
498 scoped_ptr<MockEventRouter> mock_event_router_; 498 scoped_ptr<MockEventRouter> mock_event_router_;
499 499
500 DISALLOW_COPY_AND_ASSIGN(MockExtensionSystem); 500 DISALLOW_COPY_AND_ASSIGN(MockExtensionSystem);
501 }; 501 };
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 EXPECT_EQ(4u, manager_.MenuItems(key1)->size()); 763 EXPECT_EQ(4u, manager_.MenuItems(key1)->size());
764 EXPECT_EQ(1u, manager_.MenuItems(key2)->size()); 764 EXPECT_EQ(1u, manager_.MenuItems(key2)->size());
765 765
766 // Remove all context menu items with incognito true. 766 // Remove all context menu items with incognito true.
767 manager_.RemoveAllIncognitoContextItems(); 767 manager_.RemoveAllIncognitoContextItems();
768 EXPECT_EQ(2u, manager_.MenuItems(key1)->size()); 768 EXPECT_EQ(2u, manager_.MenuItems(key1)->size());
769 EXPECT_EQ(1u, manager_.MenuItems(key2)->size()); 769 EXPECT_EQ(1u, manager_.MenuItems(key2)->size());
770 } 770 }
771 771
772 } // namespace extensions 772 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/menu_manager_factory.h ('k') | chrome/browser/extensions/mock_extension_special_storage_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698