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

Side by Side Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 2496973002: arc: Partially migrate mojo types (Closed)
Patch Set: Fixed nit Created 4 years, 1 month 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 | chrome/browser/chromeos/arc/arc_auth_service_browsertest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chromeos/arc/arc_auth_service.h" 5 #include "chrome/browser/chromeos/arc/arc_auth_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/shelf/shelf_delegate.h" 9 #include "ash/common/shelf/shelf_delegate.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 auth_callback_.Run(auth_code, is_enforced); 157 auth_callback_.Run(auth_code, is_enforced);
158 break; 158 break;
159 case CallbackType::AUTH_CODE_AND_ACCOUNT: 159 case CallbackType::AUTH_CODE_AND_ACCOUNT:
160 DCHECK(!auth_account_callback_.is_null()); 160 DCHECK(!auth_account_callback_.is_null());
161 auth_account_callback_.Run(auth_code, is_enforced, account_type); 161 auth_account_callback_.Run(auth_code, is_enforced, account_type);
162 break; 162 break;
163 case CallbackType::ACCOUNT_INFO: 163 case CallbackType::ACCOUNT_INFO:
164 DCHECK(!account_info_callback_.is_null()); 164 DCHECK(!account_info_callback_.is_null());
165 mojom::AccountInfoPtr account_info = mojom::AccountInfo::New(); 165 mojom::AccountInfoPtr account_info = mojom::AccountInfo::New();
166 if (!is_enforced) { 166 if (!is_enforced) {
167 account_info->auth_code = nullptr; 167 account_info->auth_code = base::nullopt;
168 } else { 168 } else {
169 account_info->auth_code = auth_code; 169 account_info->auth_code = auth_code;
170 } 170 }
171 account_info->account_type = account_type; 171 account_info->account_type = account_type;
172 account_info->is_managed = is_managed; 172 account_info->is_managed = is_managed;
173 account_info_callback_.Run(std::move(account_info)); 173 account_info_callback_.Run(std::move(account_info));
174 break; 174 break;
175 } 175 }
176 } 176 }
177 177
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 return os << "FETCHING_CODE"; 1146 return os << "FETCHING_CODE";
1147 case ArcAuthService::State::ACTIVE: 1147 case ArcAuthService::State::ACTIVE:
1148 return os << "ACTIVE"; 1148 return os << "ACTIVE";
1149 default: 1149 default:
1150 NOTREACHED(); 1150 NOTREACHED();
1151 return os; 1151 return os;
1152 } 1152 }
1153 } 1153 }
1154 1154
1155 } // namespace arc 1155 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_auth_service_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698