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

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

Issue 6670033: Use copies of canned browsing data helpers to populate the cookies tree model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_DATABASE_HELPER_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_DATABASE_HELPER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_DATABASE_HELPER_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_DATABASE_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 DISALLOW_COPY_AND_ASSIGN(BrowsingDataDatabaseHelper); 102 DISALLOW_COPY_AND_ASSIGN(BrowsingDataDatabaseHelper);
103 }; 103 };
104 104
105 // This class is a thin wrapper around BrowsingDataDatabaseHelper that does not 105 // This class is a thin wrapper around BrowsingDataDatabaseHelper that does not
106 // fetch its information from the database tracker, but gets them passed as 106 // fetch its information from the database tracker, but gets them passed as
107 // a parameter during construction. 107 // a parameter during construction.
108 class CannedBrowsingDataDatabaseHelper : public BrowsingDataDatabaseHelper { 108 class CannedBrowsingDataDatabaseHelper : public BrowsingDataDatabaseHelper {
109 public: 109 public:
110 explicit CannedBrowsingDataDatabaseHelper(Profile* profile); 110 explicit CannedBrowsingDataDatabaseHelper(Profile* profile);
111 111
112 // Return a copy of the database helper. Only one consumer can use the
113 // StartFetching method at a time, so we need to create a copy of the helper
114 // everytime we instantiate a cookies tree model for it.
115 CannedBrowsingDataDatabaseHelper* Clone();
116
112 // Add a database to the set of canned databases that is returned by this 117 // Add a database to the set of canned databases that is returned by this
113 // helper. 118 // helper.
114 void AddDatabase(const GURL& origin, 119 void AddDatabase(const GURL& origin,
115 const std::string& name, 120 const std::string& name,
116 const std::string& description); 121 const std::string& description);
117 122
118 // Clear the list of canned databases. 123 // Clear the list of canned databases.
119 void Reset(); 124 void Reset();
120 125
121 // True if no databases are currently stored. 126 // True if no databases are currently stored.
(...skipping 21 matching lines...) Expand all
143 148
144 // Converts the pending database info structs to database info structs. 149 // Converts the pending database info structs to database info structs.
145 void ConvertInfoInWebKitThread(); 150 void ConvertInfoInWebKitThread();
146 151
147 // Used to protect access to pending_database_info_. 152 // Used to protect access to pending_database_info_.
148 mutable base::Lock lock_; 153 mutable base::Lock lock_;
149 154
150 // This may mutate on WEBKIT and UI threads. 155 // This may mutate on WEBKIT and UI threads.
151 std::vector<PendingDatabaseInfo> pending_database_info_; 156 std::vector<PendingDatabaseInfo> pending_database_info_;
152 157
158 Profile* profile_;
159
153 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataDatabaseHelper); 160 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataDatabaseHelper);
154 }; 161 };
155 162
156 #endif // CHROME_BROWSER_BROWSING_DATA_DATABASE_HELPER_H_ 163 #endif // CHROME_BROWSER_BROWSING_DATA_DATABASE_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_appcache_helper.cc ('k') | chrome/browser/browsing_data_database_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698