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

Side by Side Diff: components/ntp_snippets/content_suggestions_service_unittest.cc

Issue 2317993004: Move OnURLsDeleted from NTPSnippetsService to ContentSuggestionsService (Closed)
Patch Set: Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ntp_snippets/content_suggestions_service.h" 5 #include "components/ntp_snippets/content_suggestions_service.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 return result; 199 return result;
200 } 200 }
201 201
202 MOCK_METHOD2(OnImageFetched, 202 MOCK_METHOD2(OnImageFetched,
203 void(const std::string& suggestion_id, const gfx::Image&)); 203 void(const std::string& suggestion_id, const gfx::Image&));
204 204
205 protected: 205 protected:
206 void CreateContentSuggestionsService( 206 void CreateContentSuggestionsService(
207 ContentSuggestionsService::State enabled) { 207 ContentSuggestionsService::State enabled) {
208 ASSERT_FALSE(service_); 208 ASSERT_FALSE(service_);
209 service_.reset(new ContentSuggestionsService(enabled)); 209 service_.reset(
210 new ContentSuggestionsService(enabled, /*history_service=*/nullptr));
210 } 211 }
211 212
212 ContentSuggestionsService* service() { return service_.get(); } 213 ContentSuggestionsService* service() { return service_.get(); }
213 214
214 private: 215 private:
215 std::unique_ptr<ContentSuggestionsService> service_; 216 std::unique_ptr<ContentSuggestionsService> service_;
216 217
217 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsServiceTest); 218 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsServiceTest);
218 }; 219 };
219 220
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 Category category = FromKnownCategory(KnownCategories::DOWNLOADS); 576 Category category = FromKnownCategory(KnownCategories::DOWNLOADS);
576 MockProvider* provider = RegisterProvider(category); 577 MockProvider* provider = RegisterProvider(category);
577 base::Time begin = base::Time::FromTimeT(123), 578 base::Time begin = base::Time::FromTimeT(123),
578 end = base::Time::FromTimeT(456); 579 end = base::Time::FromTimeT(456);
579 EXPECT_CALL(*provider, ClearHistory(begin, end, _)); 580 EXPECT_CALL(*provider, ClearHistory(begin, end, _));
580 base::Callback<bool(const GURL& url)> filter; 581 base::Callback<bool(const GURL& url)> filter;
581 service()->ClearHistory(begin, end, filter); 582 service()->ClearHistory(begin, end, filter);
582 } 583 }
583 584
584 } // namespace ntp_snippets 585 } // namespace ntp_snippets
OLDNEW
« no previous file with comments | « components/ntp_snippets/content_suggestions_service.cc ('k') | components/ntp_snippets/ntp_snippets_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698