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

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

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 years, 11 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 #include "components/search_engines/keyword_web_data_service.h" 5 #include "components/search_engines/keyword_web_data_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "components/search_engines/keyword_table.h" 10 #include "components/search_engines/keyword_table.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 WebDatabase* db) { 125 WebDatabase* db) {
126 scoped_ptr<WDTypedResult> result_ptr; 126 scoped_ptr<WDTypedResult> result_ptr;
127 WDKeywordsResult result; 127 WDKeywordsResult result;
128 if (KeywordTable::FromWebDatabase(db)->GetKeywords(&result.keywords)) { 128 if (KeywordTable::FromWebDatabase(db)->GetKeywords(&result.keywords)) {
129 result.default_search_provider_id = 129 result.default_search_provider_id =
130 KeywordTable::FromWebDatabase(db)->GetDefaultSearchProviderID(); 130 KeywordTable::FromWebDatabase(db)->GetDefaultSearchProviderID();
131 result.builtin_keyword_version = 131 result.builtin_keyword_version =
132 KeywordTable::FromWebDatabase(db)->GetBuiltinKeywordVersion(); 132 KeywordTable::FromWebDatabase(db)->GetBuiltinKeywordVersion();
133 result_ptr.reset(new WDResult<WDKeywordsResult>(KEYWORDS_RESULT, result)); 133 result_ptr.reset(new WDResult<WDKeywordsResult>(KEYWORDS_RESULT, result));
134 } 134 }
135 return result_ptr.Pass(); 135 return result_ptr;
136 } 136 }
137 137
138 WebDatabase::State KeywordWebDataService::SetDefaultSearchProviderIDImpl( 138 WebDatabase::State KeywordWebDataService::SetDefaultSearchProviderIDImpl(
139 TemplateURLID id, 139 TemplateURLID id,
140 WebDatabase* db) { 140 WebDatabase* db) {
141 return KeywordTable::FromWebDatabase(db)->SetDefaultSearchProviderID(id) ? 141 return KeywordTable::FromWebDatabase(db)->SetDefaultSearchProviderID(id) ?
142 WebDatabase::COMMIT_NEEDED : WebDatabase::COMMIT_NOT_NEEDED; 142 WebDatabase::COMMIT_NEEDED : WebDatabase::COMMIT_NOT_NEEDED;
143 } 143 }
144 144
145 WebDatabase::State KeywordWebDataService::SetBuiltinKeywordVersionImpl( 145 WebDatabase::State KeywordWebDataService::SetBuiltinKeywordVersionImpl(
146 int version, 146 int version,
147 WebDatabase* db) { 147 WebDatabase* db) {
148 return KeywordTable::FromWebDatabase(db)->SetBuiltinKeywordVersion(version) ? 148 return KeywordTable::FromWebDatabase(db)->SetBuiltinKeywordVersion(version) ?
149 WebDatabase::COMMIT_NEEDED : WebDatabase::COMMIT_NOT_NEEDED; 149 WebDatabase::COMMIT_NEEDED : WebDatabase::COMMIT_NOT_NEEDED;
150 } 150 }
OLDNEW
« no previous file with comments | « components/search_engines/default_search_pref_test_util.cc ('k') | components/search_engines/template_url.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698