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

Side by Side Diff: components/ntp_snippets/remote/ntp_snippets_database.h

Issue 2449873003: [NTP Snippets] Another round of clang-tidy cleanups (Closed)
Patch Set: rebase Created 4 years, 1 month 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 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_DATABASE_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_DATABASE_H_
6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_DATABASE_H_ 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_DATABASE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void LoadSnippets(const SnippetsCallback& callback); 54 void LoadSnippets(const SnippetsCallback& callback);
55 55
56 // Adds or updates the given snippet. 56 // Adds or updates the given snippet.
57 void SaveSnippet(const NTPSnippet& snippet); 57 void SaveSnippet(const NTPSnippet& snippet);
58 // Adds or updates all the given snippets. 58 // Adds or updates all the given snippets.
59 void SaveSnippets(const NTPSnippet::PtrVector& snippets); 59 void SaveSnippets(const NTPSnippet::PtrVector& snippets);
60 60
61 // Deletes the snippet with the given ID. 61 // Deletes the snippet with the given ID.
62 void DeleteSnippet(const std::string& snippet_id); 62 void DeleteSnippet(const std::string& snippet_id);
63 // Deletes all the given snippets (identified by their IDs). 63 // Deletes all the given snippets (identified by their IDs).
64 void DeleteSnippets(std::unique_ptr<std::vector<std::string>> keys_to_remove); 64 void DeleteSnippets(std::unique_ptr<std::vector<std::string>> snippet_ids);
65 65
66 // Loads the image data for the snippet with the given ID and passes it to 66 // Loads the image data for the snippet with the given ID and passes it to
67 // |callback|. Passes an empty string if not found. 67 // |callback|. Passes an empty string if not found.
68 void LoadImage(const std::string& snippet_id, 68 void LoadImage(const std::string& snippet_id,
69 const SnippetImageCallback& callback); 69 const SnippetImageCallback& callback);
70 70
71 // Adds or updates the image data for the given snippet ID. 71 // Adds or updates the image data for the given snippet ID.
72 void SaveImage(const std::string& snippet_id, const std::string& image_data); 72 void SaveImage(const std::string& snippet_id, const std::string& image_data);
73 73
74 // Deletes the image data for the given snippet ID. 74 // Deletes the image data for the given snippet ID.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 base::Closure error_callback_; 130 base::Closure error_callback_;
131 131
132 base::WeakPtrFactory<NTPSnippetsDatabase> weak_ptr_factory_; 132 base::WeakPtrFactory<NTPSnippetsDatabase> weak_ptr_factory_;
133 133
134 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsDatabase); 134 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsDatabase);
135 }; 135 };
136 136
137 } // namespace ntp_snippets 137 } // namespace ntp_snippets
138 138
139 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_DATABASE_H_ 139 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698