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

Side by Side Diff: chrome/browser/webdata/web_data_service.h

Issue 12695015: Split Autofill webdata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Convert all Autofill/Sync clients of WDS to using AutofillWDS Created 7 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) 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
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(
111 scoped_refptr<WebDatabaseService> wdbs,
112 const ProfileErrorCallback& callback);
111 113
112 // Notifies listeners on the UI thread that multiple changes have been made to 114 // Notifies listeners on the UI thread that multiple changes have been made to
113 // to Autofill records of the database. 115 // to Autofill records of the database.
114 // NOTE: This method is intended to be called from the DB thread. It 116 // NOTE: This method is intended to be called from the DB thread. It
115 // it asynchronously notifies listeners on the UI thread. 117 // it asynchronously notifies listeners on the UI thread.
116 // |web_data_service| may be NULL for testing purposes. 118 // |web_data_service| may be NULL for testing purposes.
117 static void NotifyOfMultipleAutofillChanges(WebDataService* web_data_service); 119 static void NotifyOfMultipleAutofillChanges(WebDataService* web_data_service);
118 120
119
120
121 ////////////////////////////////////////////////////////////////////////////// 121 //////////////////////////////////////////////////////////////////////////////
122 // 122 //
123 // Keywords 123 // Keywords
124 // 124 //
125 ////////////////////////////////////////////////////////////////////////////// 125 //////////////////////////////////////////////////////////////////////////////
126 126
127 // As the database processes requests at a later date, all deletion is 127 // As the database processes requests at a later date, all deletion is
128 // done on the background thread. 128 // done on the background thread.
129 // 129 //
130 // Many of the keyword related methods do not return a handle. This is because 130 // Many of the keyword related methods do not return a handle. This is because
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 friend class WebDataRequest; 293 friend class WebDataRequest;
294 294
295 // For unit tests, passes a null callback. 295 // For unit tests, passes a null callback.
296 WebDataService(); 296 WebDataService();
297 297
298 virtual ~WebDataService(); 298 virtual ~WebDataService();
299 299
300 private: 300 private:
301 ////////////////////////////////////////////////////////////////////////////// 301 //////////////////////////////////////////////////////////////////////////////
302 // 302 //
303 // The following methods are only invoked in the web data service thread. 303 // The following methods are only invoked on the DB thread.
304 // 304 //
305 ////////////////////////////////////////////////////////////////////////////// 305 //////////////////////////////////////////////////////////////////////////////
306 306
307 ////////////////////////////////////////////////////////////////////////////// 307 //////////////////////////////////////////////////////////////////////////////
308 // 308 //
309 // Keywords. 309 // Keywords.
310 // 310 //
311 ////////////////////////////////////////////////////////////////////////////// 311 //////////////////////////////////////////////////////////////////////////////
312 WebDatabase::State AddKeywordImpl( 312 WebDatabase::State AddKeywordImpl(
313 const TemplateURLData& data, WebDatabase* db); 313 const TemplateURLData& data, WebDatabase* db);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 419
420 // Callbacks to ensure that sensitive info is destroyed if request is 420 // Callbacks to ensure that sensitive info is destroyed if request is
421 // cancelled. 421 // cancelled.
422 void DestroyAutofillProfileResult(const WDTypedResult* result); 422 void DestroyAutofillProfileResult(const WDTypedResult* result);
423 void DestroyAutofillCreditCardResult(const WDTypedResult* result); 423 void DestroyAutofillCreditCardResult(const WDTypedResult* result);
424 424
425 DISALLOW_COPY_AND_ASSIGN(WebDataService); 425 DISALLOW_COPY_AND_ASSIGN(WebDataService);
426 }; 426 };
427 427
428 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ 428 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698