Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // Chromium settings and storage represent user-selected preferences and | 5 // Chromium settings and storage represent user-selected preferences and |
| 6 // information and MUST not be extracted, overwritten or modified except | 6 // information and MUST not be extracted, overwritten or modified except |
| 7 // through Chromium defined APIs. | 7 // through Chromium defined APIs. |
| 8 | 8 |
| 9 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 9 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| 10 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 10 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 KeywordTable::Keywords keywords; | 84 KeywordTable::Keywords keywords; |
| 85 // Identifies the ID of the TemplateURL that is the default search. A value of | 85 // Identifies the ID of the TemplateURL that is the default search. A value of |
| 86 // 0 indicates there is no default search provider. | 86 // 0 indicates there is no default search provider. |
| 87 int64 default_search_provider_id; | 87 int64 default_search_provider_id; |
| 88 // Version of the built-in keywords. A value of 0 indicates a first run. | 88 // Version of the built-in keywords. A value of 0 indicates a first run. |
| 89 int builtin_keyword_version; | 89 int builtin_keyword_version; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 class WebDataServiceConsumer; | 92 class WebDataServiceConsumer; |
| 93 | 93 |
| 94 class WebDataService : public WebDataServiceBase { | 94 class WebDataService : public WebDataServiceBase, |
| 95 public base::RefCountedThreadSafe<WebDataService, | |
| 96 content::BrowserThread::DeleteOnUIThread> { | |
|
Lei Zhang
2013/06/07 20:42:49
IWYU: add content/public/browser/browser_thread.h
Cait (Slow)
2013/06/07 21:00:42
Done.
| |
| 95 public: | 97 public: |
| 96 // Retrieve a WebDataService for the given context. | 98 // Retrieve a WebDataService for the given context. |
| 97 static scoped_refptr<WebDataService> FromBrowserContext( | 99 static scoped_refptr<WebDataService> FromBrowserContext( |
| 98 content::BrowserContext* context); | 100 content::BrowserContext* context); |
| 99 | 101 |
| 100 WebDataService(scoped_refptr<WebDatabaseService> wdbs, | 102 WebDataService(scoped_refptr<WebDatabaseService> wdbs, |
| 101 const ProfileErrorCallback& callback); | 103 const ProfileErrorCallback& callback); |
| 102 | 104 |
| 103 ////////////////////////////////////////////////////////////////////////////// | 105 ////////////////////////////////////////////////////////////////////////////// |
| 104 // | 106 // |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 WebDataServiceConsumer* consumer); | 218 WebDataServiceConsumer* consumer); |
| 217 #endif // defined(OS_WIN) | 219 #endif // defined(OS_WIN) |
| 218 | 220 |
| 219 protected: | 221 protected: |
| 220 // For unit tests, passes a null callback. | 222 // For unit tests, passes a null callback. |
| 221 WebDataService(); | 223 WebDataService(); |
| 222 | 224 |
| 223 virtual ~WebDataService(); | 225 virtual ~WebDataService(); |
| 224 | 226 |
| 225 private: | 227 private: |
| 228 friend struct content::BrowserThread::DeleteOnThread< | |
| 229 content::BrowserThread::UI>; | |
| 230 friend class base::DeleteHelper<WebDataService>; | |
| 231 // We have to friend RCTS<> so WIN shared-lib build is happy (crbug/112250). | |
| 232 friend class base::RefCountedThreadSafe<WebDataService, | |
| 233 content::BrowserThread::DeleteOnUIThread>; | |
| 226 ////////////////////////////////////////////////////////////////////////////// | 234 ////////////////////////////////////////////////////////////////////////////// |
| 227 // | 235 // |
| 228 // The following methods are only invoked on the DB thread. | 236 // The following methods are only invoked on the DB thread. |
| 229 // | 237 // |
| 230 ////////////////////////////////////////////////////////////////////////////// | 238 ////////////////////////////////////////////////////////////////////////////// |
| 231 | 239 |
| 232 ////////////////////////////////////////////////////////////////////////////// | 240 ////////////////////////////////////////////////////////////////////////////// |
| 233 // | 241 // |
| 234 // Keywords. | 242 // Keywords. |
| 235 // | 243 // |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 295 WebDatabase::State RemoveIE7LoginImpl( | 303 WebDatabase::State RemoveIE7LoginImpl( |
| 296 const IE7PasswordInfo& info, WebDatabase* db); | 304 const IE7PasswordInfo& info, WebDatabase* db); |
| 297 scoped_ptr<WDTypedResult> GetIE7LoginImpl( | 305 scoped_ptr<WDTypedResult> GetIE7LoginImpl( |
| 298 const IE7PasswordInfo& info, WebDatabase* db); | 306 const IE7PasswordInfo& info, WebDatabase* db); |
| 299 #endif // defined(OS_WIN) | 307 #endif // defined(OS_WIN) |
| 300 | 308 |
| 301 DISALLOW_COPY_AND_ASSIGN(WebDataService); | 309 DISALLOW_COPY_AND_ASSIGN(WebDataService); |
| 302 }; | 310 }; |
| 303 | 311 |
| 304 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 312 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| OLD | NEW |