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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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_WEBDATA_WEB_DATA_SERVICE_H__ 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__
6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 private: 165 private:
166 // mutable to keep GetValue() const. 166 // mutable to keep GetValue() const.
167 mutable T value_; 167 mutable T value_;
168 DISALLOW_COPY_AND_ASSIGN(WDObjectResult); 168 DISALLOW_COPY_AND_ASSIGN(WDObjectResult);
169 }; 169 };
170 170
171 class WebDataServiceConsumer; 171 class WebDataServiceConsumer;
172 172
173 class WebDataService 173 class WebDataService
174 : public base::RefCountedThreadSafe<WebDataService, 174 : public base::RefCountedThreadSafe<
175 BrowserThread::DeleteOnUIThread> { 175 WebDataService, content::BrowserThread::DeleteOnUIThread> {
176 public: 176 public:
177 // All requests return an opaque handle of the following type. 177 // All requests return an opaque handle of the following type.
178 typedef int Handle; 178 typedef int Handle;
179 179
180 ////////////////////////////////////////////////////////////////////////////// 180 //////////////////////////////////////////////////////////////////////////////
181 // 181 //
182 // Internal requests 182 // Internal requests
183 // 183 //
184 // Every request is processed using a request object. The object contains 184 // Every request is processed using a request object. The object contains
185 // both the request parameters and the results. 185 // both the request parameters and the results.
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 545
546 // Register the request as a pending request. 546 // Register the request as a pending request.
547 void RegisterRequest(WebDataRequest* request); 547 void RegisterRequest(WebDataRequest* request);
548 548
549 ////////////////////////////////////////////////////////////////////////////// 549 //////////////////////////////////////////////////////////////////////////////
550 // 550 //
551 // The following methods are only invoked in the web data service thread. 551 // The following methods are only invoked in the web data service thread.
552 // 552 //
553 ////////////////////////////////////////////////////////////////////////////// 553 //////////////////////////////////////////////////////////////////////////////
554 private: 554 private:
555 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; 555 friend struct content::BrowserThread::DeleteOnThread<
556 content::BrowserThread::UI>;
556 friend class DeleteTask<WebDataService>; 557 friend class DeleteTask<WebDataService>;
557 friend class ShutdownTask; 558 friend class ShutdownTask;
558 559
559 typedef GenericRequest2<std::vector<const TemplateURL*>, 560 typedef GenericRequest2<std::vector<const TemplateURL*>,
560 std::vector<TemplateURL*> > SetKeywordsRequest; 561 std::vector<TemplateURL*> > SetKeywordsRequest;
561 562
562 // Invoked on the main thread if initializing the db fails. 563 // Invoked on the main thread if initializing the db fails.
563 void DBInitFailed(sql::InitStatus init_status); 564 void DBInitFailed(sql::InitStatus init_status);
564 565
565 // Initialize the database, if it hasn't already been initialized. 566 // Initialize the database, if it hasn't already been initialized.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 // result can be NULL, if no result is expected or if the database could 732 // result can be NULL, if no result is expected or if the database could
732 // not be opened. The result object is destroyed after this call. 733 // not be opened. The result object is destroyed after this call.
733 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, 734 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h,
734 const WDTypedResult* result) = 0; 735 const WDTypedResult* result) = 0;
735 736
736 protected: 737 protected:
737 virtual ~WebDataServiceConsumer() {} 738 virtual ~WebDataServiceConsumer() {}
738 }; 739 };
739 740
740 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ 741 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__
OLDNEW
« no previous file with comments | « chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc ('k') | chrome/browser/webdata/web_data_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698