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

Unified Diff: components/signin/core/browser/webdata/token_web_data.cc

Issue 2672833002: [Desktop] Add diagnostics about loading the refresh tokens. (Closed)
Patch Set: Fix compile Created 3 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 side-by-side diff with in-line comments
Download patch
Index: components/signin/core/browser/webdata/token_web_data.cc
diff --git a/components/signin/core/browser/webdata/token_web_data.cc b/components/signin/core/browser/webdata/token_web_data.cc
index 0c6425529c05c362a0ef9c8fa50b6138c4987401..d8c405f060515aaa71fbfc00db834c60ffefba00 100644
--- a/components/signin/core/browser/webdata/token_web_data.cc
+++ b/components/signin/core/browser/webdata/token_web_data.cc
@@ -47,10 +47,10 @@ class TokenWebDataBackend
}
std::unique_ptr<WDTypedResult> GetAllTokens(WebDatabase* db) {
- std::map<std::string, std::string> map;
- TokenServiceTable::FromWebDatabase(db)->GetAllTokens(&map);
- return base::MakeUnique<WDResult<std::map<std::string, std::string>>>(
- TOKEN_RESULT, map);
+ TokenResult result;
+ result.db_result =
+ TokenServiceTable::FromWebDatabase(db)->GetAllTokens(&result.tokens);
+ return base::MakeUnique<WDResult<TokenResult>>(TOKEN_RESULT, result);
}
protected:
@@ -62,6 +62,11 @@ class TokenWebDataBackend
friend class base::DeleteHelper<TokenWebDataBackend>;
};
+TokenResult::TokenResult()
+ : db_result(TokenServiceTable::TOKEN_DB_RESULT_SQL_INVALID_STATEMENT) {}
+TokenResult::TokenResult(const TokenResult& other) = default;
+TokenResult::~TokenResult(){};
+
TokenWebData::TokenWebData(
scoped_refptr<WebDatabaseService> wdbs,
scoped_refptr<base::SingleThreadTaskRunner> ui_thread,
« no previous file with comments | « components/signin/core/browser/webdata/token_web_data.h ('k') | components/webdata/common/web_data_results.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698