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

Side by Side Diff: components/suggestions/suggestions_service_unittest.cc

Issue 824513003: Standardize usage of virtual/override/final specifiers in components/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/suggestions/suggestions_service.h" 5 #include "components/suggestions/suggestions_service.h"
6 6
7 #include <map> 7 #include <map>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 suggestion->set_url(kTestUrl); 106 suggestion->set_url(kTestUrl);
107 107
108 return profile; 108 return profile;
109 } 109 }
110 110
111 class TestSuggestionsStore : public suggestions::SuggestionsStore { 111 class TestSuggestionsStore : public suggestions::SuggestionsStore {
112 public: 112 public:
113 TestSuggestionsStore() { 113 TestSuggestionsStore() {
114 cached_suggestions = CreateSuggestionsProfile(); 114 cached_suggestions = CreateSuggestionsProfile();
115 } 115 }
116 virtual ~TestSuggestionsStore() {}
117 bool LoadSuggestions(SuggestionsProfile* suggestions) override { 116 bool LoadSuggestions(SuggestionsProfile* suggestions) override {
118 if (cached_suggestions.suggestions_size()) { 117 if (cached_suggestions.suggestions_size()) {
119 *suggestions = cached_suggestions; 118 *suggestions = cached_suggestions;
120 return true; 119 return true;
121 } 120 }
122 return false; 121 return false;
123 } 122 }
124 bool StoreSuggestions(const SuggestionsProfile& suggestions) 123 bool StoreSuggestions(const SuggestionsProfile& suggestions)
125 override { 124 override {
126 cached_suggestions = suggestions; 125 cached_suggestions = suggestions;
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 scoped_ptr<SuggestionsService> suggestions_service( 631 scoped_ptr<SuggestionsService> suggestions_service(
633 CreateSuggestionsServiceWithMocks()); 632 CreateSuggestionsServiceWithMocks());
634 SuggestionsProfile suggestions = 633 SuggestionsProfile suggestions =
635 CreateSuggestionsProfileWithExpiryTimestamps(); 634 CreateSuggestionsProfileWithExpiryTimestamps();
636 suggestions_service->SetDefaultExpiryTimestamp(&suggestions, 635 suggestions_service->SetDefaultExpiryTimestamp(&suggestions,
637 kTestDefaultExpiry); 636 kTestDefaultExpiry);
638 EXPECT_EQ(kTestSetExpiry, suggestions.suggestions(0).expiry_ts()); 637 EXPECT_EQ(kTestSetExpiry, suggestions.suggestions(0).expiry_ts());
639 EXPECT_EQ(kTestDefaultExpiry, suggestions.suggestions(1).expiry_ts()); 638 EXPECT_EQ(kTestDefaultExpiry, suggestions.suggestions(1).expiry_ts());
640 } 639 }
641 } // namespace suggestions 640 } // namespace suggestions
OLDNEW
« no previous file with comments | « components/renderer_context_menu/render_view_context_menu_base.h ('k') | components/sync_driver/non_ui_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698