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

Side by Side Diff: components/webdata/common/web_database_service.h

Issue 14679005: Create an AutofillBackend interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix WIN Created 7 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_ 9 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_
10 #define COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_ 10 #define COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // the status of the DB after the init. 64 // the status of the DB after the init.
65 virtual void LoadDatabase(); 65 virtual void LoadDatabase();
66 66
67 // Unloads the database without actually shutting down the service. This can 67 // Unloads the database without actually shutting down the service. This can
68 // be used to temporarily reduce the browser process' memory footprint. 68 // be used to temporarily reduce the browser process' memory footprint.
69 virtual void UnloadDatabase(); 69 virtual void UnloadDatabase();
70 70
71 // Unloads database and will not reload. 71 // Unloads database and will not reload.
72 virtual void ShutdownDatabase(); 72 virtual void ShutdownDatabase();
73 73
74 // Gets a ptr to the WebDatabase (owned by WebDatabaseService). 74 // Gets a pointer to the WebDatabase (owned by WebDatabaseService).
75 // TODO(caitkp): remove this method once SyncServices no longer depend on it. 75 // TODO(caitkp): remove this method once SyncServices no longer depend on it.
76 virtual WebDatabase* GetDatabaseOnDB() const; 76 virtual WebDatabase* GetDatabaseOnDB() const;
77 77
78 // Returns a pointer to the WebDataServiceBackend.
79 scoped_refptr<WebDataServiceBackend> GetBackend() const;
80
78 // Schedule an update/write task on the DB thread. 81 // Schedule an update/write task on the DB thread.
79 virtual void ScheduleDBTask( 82 virtual void ScheduleDBTask(
80 const tracked_objects::Location& from_here, 83 const tracked_objects::Location& from_here,
81 const WriteTask& task); 84 const WriteTask& task);
82 85
83 // Schedule a read task on the DB thread. 86 // Schedule a read task on the DB thread.
84 virtual WebDataServiceBase::Handle ScheduleDBTaskWithResult( 87 virtual WebDataServiceBase::Handle ScheduleDBTaskWithResult(
85 const tracked_objects::Location& from_here, 88 const tracked_objects::Location& from_here,
86 const ReadTask& task, 89 const ReadTask& task,
87 WebDataServiceConsumer* consumer); 90 WebDataServiceConsumer* consumer);
(...skipping 26 matching lines...) Expand all
114 // PostTask on DB thread may outlive us. 117 // PostTask on DB thread may outlive us.
115 scoped_refptr<WebDataServiceBackend> wds_backend_; 118 scoped_refptr<WebDataServiceBackend> wds_backend_;
116 119
117 ObserverList<WebDatabaseObserver> observer_list_; 120 ObserverList<WebDatabaseObserver> observer_list_;
118 121
119 // All vended weak pointers are invalidated in ShutdownDatabase(). 122 // All vended weak pointers are invalidated in ShutdownDatabase().
120 base::WeakPtrFactory<WebDatabaseService> weak_ptr_factory_; 123 base::WeakPtrFactory<WebDatabaseService> weak_ptr_factory_;
121 }; 124 };
122 125
123 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_ 126 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_SERVICE_H_
OLDNEW
« no previous file with comments | « components/webdata/common/web_data_service_backend.cc ('k') | components/webdata/common/web_database_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698