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

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

Issue 898273002: app_list::SearchResult: Duplicate() is const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. Created 5 years, 10 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_result.h" 5 #include "chrome/browser/ui/app_list/search/people/people_result.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 break; 110 break;
111 case 1: 111 case 1:
112 SendEmail(); 112 SendEmail();
113 break; 113 break;
114 default: 114 default:
115 LOG(ERROR) << "Invalid people search action: " << action_index; 115 LOG(ERROR) << "Invalid people search action: " << action_index;
116 } 116 }
117 } 117 }
118 } 118 }
119 119
120 scoped_ptr<SearchResult> PeopleResult::Duplicate() { 120 scoped_ptr<SearchResult> PeopleResult::Duplicate() const {
121 return scoped_ptr<SearchResult>( 121 return scoped_ptr<SearchResult>(
122 new PeopleResult(profile_, controller_, person_->Duplicate().Pass())); 122 new PeopleResult(profile_, controller_, person_->Duplicate().Pass()));
123 } 123 }
124 124
125 void PeopleResult::OnIconLoaded() { 125 void PeopleResult::OnIconLoaded() {
126 // Remove the existing image reps since the icon data is loaded and they 126 // Remove the existing image reps since the icon data is loaded and they
127 // need to be re-created. 127 // need to be re-created.
128 const std::vector<gfx::ImageSkiaRep>& image_reps = image_.image_reps(); 128 const std::vector<gfx::ImageSkiaRep>& image_reps = image_.image_reps();
129 for (size_t i = 0; i < image_reps.size(); ++i) 129 for (size_t i = 0; i < image_reps.size(); ++i)
130 image_.RemoveRepresentation(image_reps[i].scale()); 130 image_.RemoveRepresentation(image_reps[i].scale());
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 if (extensions::EventRouter::Get(profile_)->ExtensionHasEventListener( 194 if (extensions::EventRouter::Get(profile_)->ExtensionHasEventListener(
195 kHangoutsExtensionIds[i], OnHangoutRequested::kEventName)) { 195 kHangoutsExtensionIds[i], OnHangoutRequested::kEventName)) {
196 hangouts_extension_id_ = kHangoutsExtensionIds[i]; 196 hangouts_extension_id_ = kHangoutsExtensionIds[i];
197 return; 197 return;
198 } 198 }
199 } 199 }
200 hangouts_extension_id_.clear(); 200 hangouts_extension_id_.clear();
201 } 201 }
202 202
203 } // namespace app_list 203 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/people/people_result.h ('k') | chrome/browser/ui/app_list/search/search_webstore_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698