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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 class WebDataServiceConsumer; | 100 class WebDataServiceConsumer; |
101 | 101 |
102 class WebDataService | 102 class WebDataService |
103 : public WebDataServiceBase, | 103 : public WebDataServiceBase, |
104 public AutofillWebData { | 104 public AutofillWebData { |
105 public: | 105 public: |
106 // Retrieve a WebDataService for the given context. | 106 // Retrieve a WebDataService for the given context. |
107 static scoped_refptr<WebDataService> FromBrowserContext( | 107 static scoped_refptr<WebDataService> FromBrowserContext( |
108 content::BrowserContext* context); | 108 content::BrowserContext* context); |
109 | 109 |
110 explicit WebDataService(const ProfileErrorCallback& callback); | 110 WebDataService(scoped_refptr<WebDatabaseService> wdbs, |
111 const ProfileErrorCallback& callback); | |
Jói
2013/03/20 12:41:29
indentation: indent to (
Cait (Slow)
2013/03/20 22:21:10
Done.
| |
111 | 112 |
112 // Notifies listeners on the UI thread that multiple changes have been made to | 113 // Notifies listeners on the UI thread that multiple changes have been made to |
113 // to Autofill records of the database. | 114 // to Autofill records of the database. |
114 // NOTE: This method is intended to be called from the DB thread. It | 115 // NOTE: This method is intended to be called from the DB thread. It |
115 // it asynchronously notifies listeners on the UI thread. | 116 // it asynchronously notifies listeners on the UI thread. |
116 // |web_data_service| may be NULL for testing purposes. | 117 // |web_data_service| may be NULL for testing purposes. |
117 static void NotifyOfMultipleAutofillChanges(WebDataService* web_data_service); | 118 static void NotifyOfMultipleAutofillChanges(WebDataService* web_data_service); |
118 | 119 |
119 | |
120 | |
121 ////////////////////////////////////////////////////////////////////////////// | 120 ////////////////////////////////////////////////////////////////////////////// |
122 // | 121 // |
123 // Keywords | 122 // Keywords |
124 // | 123 // |
125 ////////////////////////////////////////////////////////////////////////////// | 124 ////////////////////////////////////////////////////////////////////////////// |
126 | 125 |
127 // As the database processes requests at a later date, all deletion is | 126 // As the database processes requests at a later date, all deletion is |
128 // done on the background thread. | 127 // done on the background thread. |
129 // | 128 // |
130 // Many of the keyword related methods do not return a handle. This is because | 129 // Many of the keyword related methods do not return a handle. This is because |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
291 friend class TemplateURLServiceTestingProfile; | 290 friend class TemplateURLServiceTestingProfile; |
292 friend class WebDataServiceTest; | 291 friend class WebDataServiceTest; |
293 friend class WebDataRequest; | 292 friend class WebDataRequest; |
294 | 293 |
295 // For unit tests, passes a null callback. | 294 // For unit tests, passes a null callback. |
296 WebDataService(); | 295 WebDataService(); |
297 | 296 |
298 virtual ~WebDataService(); | 297 virtual ~WebDataService(); |
299 | 298 |
300 private: | 299 private: |
301 ////////////////////////////////////////////////////////////////////////////// | |
302 // | |
303 // The following methods are only invoked in the web data service thread. | |
Jói
2013/03/20 12:41:29
Is there a reason to remove this comment? Maybe ju
Cait (Slow)
2013/03/20 22:21:10
Done.
| |
304 // | |
305 ////////////////////////////////////////////////////////////////////////////// | |
306 | 300 |
307 ////////////////////////////////////////////////////////////////////////////// | 301 ////////////////////////////////////////////////////////////////////////////// |
308 // | 302 // |
309 // Keywords. | 303 // Keywords. |
310 // | 304 // |
311 ////////////////////////////////////////////////////////////////////////////// | 305 ////////////////////////////////////////////////////////////////////////////// |
312 WebDatabase::State AddKeywordImpl( | 306 WebDatabase::State AddKeywordImpl( |
313 const TemplateURLData& data, WebDatabase* db); | 307 const TemplateURLData& data, WebDatabase* db); |
314 WebDatabase::State RemoveKeywordImpl( | 308 WebDatabase::State RemoveKeywordImpl( |
315 TemplateURLID id, WebDatabase* db); | 309 TemplateURLID id, WebDatabase* db); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
419 | 413 |
420 // Callbacks to ensure that sensitive info is destroyed if request is | 414 // Callbacks to ensure that sensitive info is destroyed if request is |
421 // cancelled. | 415 // cancelled. |
422 void DestroyAutofillProfileResult(const WDTypedResult* result); | 416 void DestroyAutofillProfileResult(const WDTypedResult* result); |
423 void DestroyAutofillCreditCardResult(const WDTypedResult* result); | 417 void DestroyAutofillCreditCardResult(const WDTypedResult* result); |
424 | 418 |
425 DISALLOW_COPY_AND_ASSIGN(WebDataService); | 419 DISALLOW_COPY_AND_ASSIGN(WebDataService); |
426 }; | 420 }; |
427 | 421 |
428 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 422 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
OLD | NEW |