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

Side by Side Diff: chrome/browser/ui/app_list/search/people/people_provider.cc

Issue 621823004: Simplifies the structure of app_list search a bit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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 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 "chrome/browser/ui/app_list/search/people/people_provider.h" 5 #include "chrome/browser/ui/app_list/search/people/people_provider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 continue; 175 continue;
176 176
177 scoped_ptr<SearchResult> result(CreateResult(*dict)); 177 scoped_ptr<SearchResult> result(CreateResult(*dict));
178 if (!result) 178 if (!result)
179 continue; 179 continue;
180 180
181 Add(result.Pass()); 181 Add(result.Pass());
182 } 182 }
183 } 183 }
184 184
185 scoped_ptr<ChromeSearchResult> PeopleProvider::CreateResult( 185 scoped_ptr<SearchResult> PeopleProvider::CreateResult(
186 const base::DictionaryValue& dict) { 186 const base::DictionaryValue& dict) {
187 scoped_ptr<ChromeSearchResult> result; 187 scoped_ptr<SearchResult> result;
188 188
189 scoped_ptr<Person> person = Person::Create(dict); 189 scoped_ptr<Person> person = Person::Create(dict);
190 if (!person) 190 if (!person)
191 return result.Pass(); 191 return result.Pass();
192 192
193 result.reset(new PeopleResult(profile_, person.Pass())); 193 result.reset(new PeopleResult(profile_, person.Pass()));
194 return result.Pass(); 194 return result.Pass();
195 } 195 }
196 196
197 void PeopleProvider::SetupForTest( 197 void PeopleProvider::SetupForTest(
198 const base::Closure& people_search_fetched_callback, 198 const base::Closure& people_search_fetched_callback,
199 const GURL& people_search_url) { 199 const GURL& people_search_url) {
200 people_search_fetched_callback_ = people_search_fetched_callback; 200 people_search_fetched_callback_ = people_search_fetched_callback;
201 people_search_url_ = people_search_url; 201 people_search_url_ = people_search_url;
202 skip_request_token_for_test_ = true; 202 skip_request_token_for_test_ = true;
203 } 203 }
204 204
205 } // namespace app_list 205 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698