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

Side by Side Diff: components/ntp_snippets/ntp_snippets_service.h

Issue 1907233002: Allows to dump current snippets to a json in the Downloads folder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: After code review #2 Created 4 years, 7 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
« no previous file with comments | « chrome/browser/ui/webui/snippets_internals_message_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // the schedule depends on the time of day 83 // the schedule depends on the time of day
84 void RescheduleFetching(); 84 void RescheduleFetching();
85 85
86 // Deletes all currently stored snippets. 86 // Deletes all currently stored snippets.
87 void ClearSnippets(); 87 void ClearSnippets();
88 88
89 // Discards the snippet with the given |url|, if it exists. Returns true iff 89 // Discards the snippet with the given |url|, if it exists. Returns true iff
90 // a snippet was discarded. 90 // a snippet was discarded.
91 bool DiscardSnippet(const GURL& url); 91 bool DiscardSnippet(const GURL& url);
92 92
93 // Returns the lists of snippets previously discarded by the user (that are 93 // Returns the list of snippets previously discarded by the user (that are
94 // not expired yet). 94 // not expired yet).
95 const NTPSnippetStorage& discarded_snippets() const { 95 const NTPSnippetStorage& discarded_snippets() const {
96 return discarded_snippets_; 96 return discarded_snippets_;
97 } 97 }
98 98
99 // Clears the lists of snippets previously discarded by the user. 99 // Clears the lists of snippets previously discarded by the user.
100 void ClearDiscardedSnippets(); 100 void ClearDiscardedSnippets();
101 101
102 // Returns the lists of suggestion hosts the snippets are restricted to. 102 // Returns the lists of suggestion hosts the snippets are restricted to.
103 std::set<std::string> GetSuggestionsHosts() const; 103 std::set<std::string> GetSuggestionsHosts() const;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // Sent when the service is shutting down. 206 // Sent when the service is shutting down.
207 virtual void NTPSnippetsServiceShutdown() = 0; 207 virtual void NTPSnippetsServiceShutdown() = 0;
208 208
209 protected: 209 protected:
210 virtual ~NTPSnippetsServiceObserver() {} 210 virtual ~NTPSnippetsServiceObserver() {}
211 }; 211 };
212 212
213 } // namespace ntp_snippets 213 } // namespace ntp_snippets
214 214
215 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 215 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/snippets_internals_message_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698