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

Side by Side Diff: chrome/browser/browsing_data_indexed_db_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_INDEXED_DB_HELPER_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_INDEXED_DB_HELPER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_INDEXED_DB_HELPER_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_INDEXED_DB_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 }; 78 };
79 79
80 // This class is an implementation of BrowsingDataIndexedDBHelper that does 80 // This class is an implementation of BrowsingDataIndexedDBHelper that does
81 // not fetch its information from the indexed database tracker, but gets them 81 // not fetch its information from the indexed database tracker, but gets them
82 // passed as a parameter. 82 // passed as a parameter.
83 class CannedBrowsingDataIndexedDBHelper 83 class CannedBrowsingDataIndexedDBHelper
84 : public BrowsingDataIndexedDBHelper { 84 : public BrowsingDataIndexedDBHelper {
85 public: 85 public:
86 explicit CannedBrowsingDataIndexedDBHelper(Profile* profile); 86 explicit CannedBrowsingDataIndexedDBHelper(Profile* profile);
87 87
88 // Return a copy of the IndexedDB helper. Only one consumer can use the
89 // StartFetching method at a time, so we need to create a copy of the helper
90 // everytime we instantiate a cookies tree model for it.
91 CannedBrowsingDataIndexedDBHelper* Clone();
92
88 // Add a indexed database to the set of canned indexed databases that is 93 // Add a indexed database to the set of canned indexed databases that is
89 // returned by this helper. 94 // returned by this helper.
90 void AddIndexedDB(const GURL& origin, 95 void AddIndexedDB(const GURL& origin,
91 const string16& description); 96 const string16& description);
92 97
93 // Clear the list of canned indexed databases. 98 // Clear the list of canned indexed databases.
94 void Reset(); 99 void Reset();
95 100
96 // True if no indexed databases are currently stored. 101 // True if no indexed databases are currently stored.
97 bool empty() const; 102 bool empty() const;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // Indicates whether or not we're currently fetching information: 142 // Indicates whether or not we're currently fetching information:
138 // it's true when StartFetching() is called in the UI thread, and it's reset 143 // it's true when StartFetching() is called in the UI thread, and it's reset
139 // after we notified the callback in the UI thread. 144 // after we notified the callback in the UI thread.
140 // This only mutates on the UI thread. 145 // This only mutates on the UI thread.
141 bool is_fetching_; 146 bool is_fetching_;
142 147
143 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataIndexedDBHelper); 148 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataIndexedDBHelper);
144 }; 149 };
145 150
146 #endif // CHROME_BROWSER_BROWSING_DATA_INDEXED_DB_HELPER_H_ 151 #endif // CHROME_BROWSER_BROWSING_DATA_INDEXED_DB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_database_helper.cc ('k') | chrome/browser/browsing_data_indexed_db_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698