| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "google_apis/gaia/oauth2_mint_token_flow.h" | 5 #include "google_apis/gaia/oauth2_mint_token_flow.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 base::string16 detail; | 261 base::string16 detail; |
| 262 if (!scopes_list->GetDictionary(index, &scopes_entry) || | 262 if (!scopes_list->GetDictionary(index, &scopes_entry) || |
| 263 !scopes_entry->GetString(kDescriptionKey, &entry.description) || | 263 !scopes_entry->GetString(kDescriptionKey, &entry.description) || |
| 264 !scopes_entry->GetString(kDetailKey, &detail)) { | 264 !scopes_entry->GetString(kDetailKey, &detail)) { |
| 265 success = false; | 265 success = false; |
| 266 break; | 266 break; |
| 267 } | 267 } |
| 268 | 268 |
| 269 TrimWhitespace(entry.description, TRIM_ALL, &entry.description); | 269 TrimWhitespace(entry.description, TRIM_ALL, &entry.description); |
| 270 static const base::string16 detail_separators = | 270 static const base::string16 detail_separators = |
| 271 ASCIIToUTF16(kDetailSeparators); | 271 base::ASCIIToUTF16(kDetailSeparators); |
| 272 Tokenize(detail, detail_separators, &entry.details); | 272 Tokenize(detail, detail_separators, &entry.details); |
| 273 for (size_t i = 0; i < entry.details.size(); i++) | 273 for (size_t i = 0; i < entry.details.size(); i++) |
| 274 TrimWhitespace(entry.details[i], TRIM_ALL, &entry.details[i]); | 274 TrimWhitespace(entry.details[i], TRIM_ALL, &entry.details[i]); |
| 275 issue_advice->push_back(entry); | 275 issue_advice->push_back(entry); |
| 276 } | 276 } |
| 277 | 277 |
| 278 if (!success) | 278 if (!success) |
| 279 issue_advice->clear(); | 279 issue_advice->clear(); |
| 280 | 280 |
| 281 return success; | 281 return success; |
| 282 } | 282 } |
| OLD | NEW |