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

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

Issue 2292003002: Move OnURLsDeleted from NTPSnippetsService to ContentSuggestionsService (Closed)
Patch Set: Marc's nits. 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 service()->RegisterProvider(std::move(provider)); 198 service()->RegisterProvider(std::move(provider));
199 return result; 199 return result;
200 } 200 }
201 201
202 MOCK_METHOD1(OnImageFetched, void(const gfx::Image&)); 202 MOCK_METHOD1(OnImageFetched, void(const gfx::Image&));
203 203
204 protected: 204 protected:
205 void CreateContentSuggestionsService( 205 void CreateContentSuggestionsService(
206 ContentSuggestionsService::State enabled) { 206 ContentSuggestionsService::State enabled) {
207 ASSERT_FALSE(service_); 207 ASSERT_FALSE(service_);
208 service_.reset(new ContentSuggestionsService(enabled)); 208 service_.reset(
209 new ContentSuggestionsService(enabled, /*history_service=*/nullptr));
209 } 210 }
210 211
211 ContentSuggestionsService* service() { return service_.get(); } 212 ContentSuggestionsService* service() { return service_.get(); }
212 213
213 private: 214 private:
214 std::unique_ptr<ContentSuggestionsService> service_; 215 std::unique_ptr<ContentSuggestionsService> service_;
215 216
216 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsServiceTest); 217 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsServiceTest);
217 }; 218 };
218 219
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 Category category = FromKnownCategory(KnownCategories::DOWNLOADS); 574 Category category = FromKnownCategory(KnownCategories::DOWNLOADS);
574 MockProvider* provider = RegisterProvider(category); 575 MockProvider* provider = RegisterProvider(category);
575 base::Time begin = base::Time::FromTimeT(123), 576 base::Time begin = base::Time::FromTimeT(123),
576 end = base::Time::FromTimeT(456); 577 end = base::Time::FromTimeT(456);
577 EXPECT_CALL(*provider, ClearHistory(begin, end, _)); 578 EXPECT_CALL(*provider, ClearHistory(begin, end, _));
578 base::Callback<bool(const GURL& url)> filter; 579 base::Callback<bool(const GURL& url)> filter;
579 service()->ClearHistory(begin, end, filter); 580 service()->ClearHistory(begin, end, filter);
580 } 581 }
581 582
582 } // namespace ntp_snippets 583 } // 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