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

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

Issue 479353003: Add IsAuthenticated() method to SigninManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 6 years, 3 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 | Annotate | Revision Log
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 void PeopleResult::OpenChat() { 146 void PeopleResult::OpenChat() {
147 HangoutRequest request; 147 HangoutRequest request;
148 148
149 request.type = extensions::api::hangouts_private::HANGOUT_TYPE_CHAT; 149 request.type = extensions::api::hangouts_private::HANGOUT_TYPE_CHAT;
150 150
151 // from: the user this chat request is originating from. 151 // from: the user this chat request is originating from.
152 SigninManagerBase* signin_manager = 152 SigninManagerBase* signin_manager =
153 SigninManagerFactory::GetInstance()->GetForProfile(profile_); 153 SigninManagerFactory::GetInstance()->GetForProfile(profile_);
154 DCHECK(signin_manager); 154 DCHECK(signin_manager);
155 request.from = signin_manager->GetAuthenticatedAccountId(); 155 request.from = signin_manager->GetAuthenticatedUsername();
156 156
157 // to: list of users with whom to start this hangout is with. 157 // to: list of users with whom to start this hangout is with.
158 linked_ptr<User> target(new User()); 158 linked_ptr<User> target(new User());
159 target->id = person_->owner_id; 159 target->id = person_->owner_id;
160 request.to.push_back(target); 160 request.to.push_back(target);
161 161
162 scoped_ptr<extensions::Event> event( 162 scoped_ptr<extensions::Event> event(
163 new extensions::Event(OnHangoutRequested::kEventName, 163 new extensions::Event(OnHangoutRequested::kEventName,
164 OnHangoutRequested::Create(request))); 164 OnHangoutRequested::Create(request)));
165 165
(...skipping 26 matching lines...) Expand all
192 } 192 }
193 } 193 }
194 hangouts_extension_id_.clear(); 194 hangouts_extension_id_.clear();
195 } 195 }
196 196
197 ChromeSearchResultType PeopleResult::GetType() { 197 ChromeSearchResultType PeopleResult::GetType() {
198 return SEARCH_PEOPLE_SEARCH_RESULT; 198 return SEARCH_PEOPLE_SEARCH_RESULT;
199 } 199 }
200 200
201 } // namespace app_list 201 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/sync_engine.cc ('k') | chrome/browser/ui/chrome_pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698