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

Unified Diff: chrome/browser/privacy_blacklist/blacklist_io.h

Issue 173357: Error diagnostics for Blacklist IO... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/privacy_blacklist/blacklist_io.h
===================================================================
--- chrome/browser/privacy_blacklist/blacklist_io.h (revision 25875)
+++ chrome/browser/privacy_blacklist/blacklist_io.h (working copy)
@@ -7,6 +7,7 @@
#include <list>
+#include "base/string16.h"
#include "chrome/browser/privacy_blacklist/blacklist.h"
class FilePath;
@@ -24,6 +25,12 @@
// Writes a binary blacklist with aggregated entries for all read blacklists.
bool Write(const FilePath& path);
+ // Returns the text of the last occuring error. An empty string is returned
+ // if no such error happened.
+ const string16& last_error() const {
+ return last_error_;
+ }
+
private:
// Introspection functions, for testing purposes.
const std::list<Blacklist::Entry*>& blacklist() const {
@@ -35,6 +42,7 @@
std::list<Blacklist::Entry*> blacklist_;
std::list<Blacklist::Provider*> providers_;
+ string16 last_error_; // Stores text of last error, empty if N/A.
FRIEND_TEST(BlacklistIOTest, Generic);
FRIEND_TEST(BlacklistIOTest, Combine);

Powered by Google App Engine
This is Rietveld 408576698