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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_database_helper.h

Issue 546663003: Remove Clone() from CannedBrowsingData*Helper classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_DATABASE_HELPER_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_DATABASE_HELPER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_DATABASE_HELPER_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_DATABASE_HELPER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // The operator is needed to store |PendingDatabaseInfo| objects in a set. 108 // The operator is needed to store |PendingDatabaseInfo| objects in a set.
109 bool operator<(const PendingDatabaseInfo& other) const; 109 bool operator<(const PendingDatabaseInfo& other) const;
110 110
111 GURL origin; 111 GURL origin;
112 std::string name; 112 std::string name;
113 std::string description; 113 std::string description;
114 }; 114 };
115 115
116 explicit CannedBrowsingDataDatabaseHelper(Profile* profile); 116 explicit CannedBrowsingDataDatabaseHelper(Profile* profile);
117 117
118 // Return a copy of the database helper. Only one consumer can use the
119 // StartFetching method at a time, so we need to create a copy of the helper
120 // everytime we instantiate a cookies tree model for it.
121 CannedBrowsingDataDatabaseHelper* Clone();
122
123 // Add a database to the set of canned databases that is returned by this 118 // Add a database to the set of canned databases that is returned by this
124 // helper. 119 // helper.
125 void AddDatabase(const GURL& origin, 120 void AddDatabase(const GURL& origin,
126 const std::string& name, 121 const std::string& name,
127 const std::string& description); 122 const std::string& description);
128 123
129 // Clear the list of canned databases. 124 // Clear the list of canned databases.
130 void Reset(); 125 void Reset();
131 126
132 // True if no databases are currently stored. 127 // True if no databases are currently stored.
(...skipping 10 matching lines...) Expand all
143 const base::Callback<void(const std::list<DatabaseInfo>&)>& callback) 138 const base::Callback<void(const std::list<DatabaseInfo>&)>& callback)
144 OVERRIDE; 139 OVERRIDE;
145 virtual void DeleteDatabase(const std::string& origin_identifier, 140 virtual void DeleteDatabase(const std::string& origin_identifier,
146 const std::string& name) OVERRIDE; 141 const std::string& name) OVERRIDE;
147 142
148 private: 143 private:
149 virtual ~CannedBrowsingDataDatabaseHelper(); 144 virtual ~CannedBrowsingDataDatabaseHelper();
150 145
151 std::set<PendingDatabaseInfo> pending_database_info_; 146 std::set<PendingDatabaseInfo> pending_database_info_;
152 147
153 Profile* profile_;
154
155 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataDatabaseHelper); 148 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataDatabaseHelper);
156 }; 149 };
157 150
158 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_DATABASE_HELPER_H_ 151 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_DATABASE_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698