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

Side by Side Diff: components/search_engines/keyword_web_data_service.h

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__ 5 #ifndef COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__
6 #define COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__ 6 #define COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "components/search_engines/keyword_table.h" 9 #include "components/search_engines/keyword_table.h"
10 #include "components/search_engines/template_url_id.h" 10 #include "components/search_engines/template_url_id.h"
11 #include "components/webdata/common/web_data_service_base.h" 11 #include "components/webdata/common/web_data_service_base.h"
12 #include "components/webdata/common/web_database.h" 12 #include "components/webdata/common/web_database.h"
13 13
14 namespace base { 14 namespace base {
15 class MessageLoopProxy; 15 class SingleThreadTaskRunner;
16 } 16 }
17 17
18 class WDTypedResult; 18 class WDTypedResult;
19 class WebDatabaseService; 19 class WebDatabaseService;
20 struct TemplateURLData; 20 struct TemplateURLData;
21 21
22 struct WDKeywordsResult { 22 struct WDKeywordsResult {
23 WDKeywordsResult(); 23 WDKeywordsResult();
24 ~WDKeywordsResult(); 24 ~WDKeywordsResult();
25 25
(...skipping 24 matching lines...) Expand all
50 explicit BatchModeScoper(KeywordWebDataService* service); 50 explicit BatchModeScoper(KeywordWebDataService* service);
51 ~BatchModeScoper(); 51 ~BatchModeScoper();
52 52
53 private: 53 private:
54 KeywordWebDataService* service_; 54 KeywordWebDataService* service_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(BatchModeScoper); 56 DISALLOW_COPY_AND_ASSIGN(BatchModeScoper);
57 }; 57 };
58 58
59 KeywordWebDataService(scoped_refptr<WebDatabaseService> wdbs, 59 KeywordWebDataService(scoped_refptr<WebDatabaseService> wdbs,
60 scoped_refptr<base::MessageLoopProxy> ui_thread, 60 scoped_refptr<base::SingleThreadTaskRunner> ui_thread,
61 const ProfileErrorCallback& callback); 61 const ProfileErrorCallback& callback);
62 62
63 // As the database processes requests at a later date, all deletion is 63 // As the database processes requests at a later date, all deletion is
64 // done on the background thread. 64 // done on the background thread.
65 // 65 //
66 // Many of the keyword related methods do not return a handle. This is because 66 // Many of the keyword related methods do not return a handle. This is because
67 // the caller (TemplateURLService) does not need to know when the request is 67 // the caller (TemplateURLService) does not need to know when the request is
68 // done. 68 // done.
69 69
70 void AddKeyword(const TemplateURLData& data); 70 void AddKeyword(const TemplateURLData& data);
(...skipping 30 matching lines...) Expand all
101 WebDatabase* db); 101 WebDatabase* db);
102 WebDatabase::State SetBuiltinKeywordVersionImpl(int version, WebDatabase* db); 102 WebDatabase::State SetBuiltinKeywordVersionImpl(int version, WebDatabase* db);
103 103
104 size_t batch_mode_level_; 104 size_t batch_mode_level_;
105 KeywordTable::Operations queued_keyword_operations_; 105 KeywordTable::Operations queued_keyword_operations_;
106 106
107 DISALLOW_COPY_AND_ASSIGN(KeywordWebDataService); 107 DISALLOW_COPY_AND_ASSIGN(KeywordWebDataService);
108 }; 108 };
109 109
110 #endif // COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__ 110 #endif // COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698