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

Side by Side Diff: ui/app_list/search_controller.cc

Issue 1123373007: Substitued pattern push_back(ptr.release()) with push_back(ptr.Pass()) in directory src/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed the review comments Created 5 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
« no previous file with comments | « no previous file | ui/app_list/search_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/app_list/search_controller.h" 5 #include "ui/app_list/search_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 double multiplier) { 115 double multiplier) {
116 return mixer_->AddOmniboxGroup(max_results, boost, multiplier); 116 return mixer_->AddOmniboxGroup(max_results, boost, multiplier);
117 } 117 }
118 118
119 void SearchController::AddProvider(size_t group_id, 119 void SearchController::AddProvider(size_t group_id,
120 scoped_ptr<SearchProvider> provider) { 120 scoped_ptr<SearchProvider> provider) {
121 provider->set_result_changed_callback(base::Bind( 121 provider->set_result_changed_callback(base::Bind(
122 &SearchController::OnResultsChanged, 122 &SearchController::OnResultsChanged,
123 base::Unretained(this))); 123 base::Unretained(this)));
124 mixer_->AddProviderToGroup(group_id, provider.get()); 124 mixer_->AddProviderToGroup(group_id, provider.get());
125 providers_.push_back(provider.release()); // Takes ownership. 125 providers_.push_back(provider.Pass());
126 } 126 }
127 127
128 void SearchController::OnResultsChanged() { 128 void SearchController::OnResultsChanged() {
129 if (dispatching_query_) 129 if (dispatching_query_)
130 return; 130 return;
131 131
132 KnownResults known_results; 132 KnownResults known_results;
133 if (history_ && history_->IsReady()) { 133 if (history_ && history_->IsReady()) {
134 history_->GetKnownResults(base::UTF16ToUTF8(search_box_->text())) 134 history_->GetKnownResults(base::UTF16ToUTF8(search_box_->text()))
135 ->swap(known_results); 135 ->swap(known_results);
136 } 136 }
137 137
138 mixer_->MixAndPublish(is_voice_query_, known_results); 138 mixer_->MixAndPublish(is_voice_query_, known_results);
139 } 139 }
140 140
141 } // namespace app_list 141 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698