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

Side by Side Diff: chrome/browser/webdata/token_service_table.h

Issue 130813003: Create signin component and componentize TokenWebData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_WEBDATA_TOKEN_SERVICE_TABLE_H_
6 #define CHROME_BROWSER_WEBDATA_TOKEN_SERVICE_TABLE_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/compiler_specific.h"
12 #include "components/webdata/common/web_database_table.h"
13
14 class WebDatabase;
15
16 class TokenServiceTable : public WebDatabaseTable {
17 public:
18 TokenServiceTable() {}
19 virtual ~TokenServiceTable() {}
20
21 // Retrieves the TokenServiceTable* owned by |database|.
22 static TokenServiceTable* FromWebDatabase(WebDatabase* db);
23
24 virtual WebDatabaseTable::TypeKey GetTypeKey() const OVERRIDE;
25 virtual bool Init(sql::Connection* db, sql::MetaTable* meta_table) OVERRIDE;
26 virtual bool IsSyncable() OVERRIDE;
27 virtual bool MigrateToVersion(int version,
28 bool* update_compatible_version) OVERRIDE;
29
30 // Remove all tokens previously set with SetTokenForService.
31 bool RemoveAllTokens();
32
33 // Removes a token related to the service from the token_service table.
34 bool RemoveTokenForService(const std::string& service);
35
36 // Retrieves all tokens previously set with SetTokenForService.
37 // Returns true if there were tokens and we decrypted them,
38 // false if there was a failure somehow
39 bool GetAllTokens(std::map<std::string, std::string>* tokens);
40
41 // Store a token in the token_service table. Stored encrypted. May cause
42 // a mac keychain popup.
43 // True if we encrypted a token and stored it, false otherwise.
44 bool SetTokenForService(const std::string& service,
45 const std::string& token);
46
47 private:
48 DISALLOW_COPY_AND_ASSIGN(TokenServiceTable);
49 };
50
51 #endif // CHROME_BROWSER_WEBDATA_TOKEN_SERVICE_TABLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_autofill_unittest.cc ('k') | chrome/browser/webdata/token_service_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698