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

Side by Side Diff: chrome/browser/signin/signin_internals_util.cc

Issue 14888003: [Sync] Log age of auth tokens on authentication failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 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 (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 "chrome/browser/signin/signin_internals_util.h" 5 #include "chrome/browser/signin/signin_internals_util.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 char hash_val[kTruncateSize]; 60 char hash_val[kTruncateSize];
61 crypto::SHA256HashString(str, &hash_val[0], kTruncateSize); 61 crypto::SHA256HashString(str, &hash_val[0], kTruncateSize);
62 return StringToLowerASCII(base::HexEncode(&hash_val[0], kTruncateSize)); 62 return StringToLowerASCII(base::HexEncode(&hash_val[0], kTruncateSize));
63 } 63 }
64 64
65 } // namespace 65 } // namespace
66 66
67 TokenInfo::TokenInfo(const std::string& token, 67 TokenInfo::TokenInfo(const std::string& token,
68 const std::string& status, 68 const std::string& status,
69 const std::string& time, 69 const std::string& time,
70 const int64& time_internal,
70 const std::string& service) 71 const std::string& service)
71 : token(token), 72 : token(token),
72 status(status), 73 status(status),
73 time(time), 74 time(time),
75 time_internal(time_internal),
74 service(service) { 76 service(service) {
75 } 77 }
76 78
77 TokenInfo::TokenInfo() { 79 TokenInfo::TokenInfo() {
78 } 80 }
79 81
80 TokenInfo::~TokenInfo() { 82 TokenInfo::~TokenInfo() {
81 } 83 }
82 84
83 DictionaryValue* TokenInfo::ToValue() { 85 DictionaryValue* TokenInfo::ToValue() {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 for (std::map<std::string, TokenInfo>::iterator it = token_info_map.begin(); 286 for (std::map<std::string, TokenInfo>::iterator it = token_info_map.begin();
285 it != token_info_map.end(); ++it) { 287 it != token_info_map.end(); ++it) {
286 DictionaryValue* token_info = it->second.ToValue(); 288 DictionaryValue* token_info = it->second.ToValue();
287 token_details->Append(token_info); 289 token_details->Append(token_info);
288 } 290 }
289 291
290 return signin_status.Pass(); 292 return signin_status.Pass();
291 } 293 }
292 294
293 } // namespace signin_internals_util 295 } // namespace signin_internals_util
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_internals_util.h ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698