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

Side by Side Diff: chrome/browser/password_manager/sync_metrics.h

Issue 383083009: [Password Manager] Fix crash in reporting sync stats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_SYNC_METRICS_H_ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_SYNC_METRICS_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_SYNC_METRICS_H_ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_SYNC_METRICS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 class Profile; 10 class Profile;
11 11
12 namespace password_manager_sync_metrics { 12 namespace password_manager_sync_metrics {
13 13
14 // Returns the sync username for |profile|. Returns an empty string if the 14 // Returns the sync username for |profile|. Returns an empty string if the
15 // |profile| isn't syncing passwords. 15 // |profile| isn't syncing. It would be preferable to only return the username
16 std::string GetPasswordSyncUsername(Profile* profile); 16 // if the user is syncing passwords, but that is not currently possible since
17 // this function can be called during sync setup (http://crbug.com/393626).
18 std::string GetSyncUsername(Profile* profile);
17 19
18 // Returns true if |username| and |origin| correspond to the account which is 20 // Returns true if |username| and |origin| correspond to the account which is
19 // syncing passwords. Will return false if |profile| is not syncing passwords. 21 // syncing. Will return false if |profile| is not syncing.
20 bool IsPasswordSyncAccountCredential(Profile* profile, 22 bool IsSyncAccountCredential(Profile* profile,
21 const std::string& username, 23 const std::string& username,
22 const std::string& origin); 24 const std::string& origin);
23 25
24 } // namespace password_manager_sync_metrics 26 } // namespace password_manager_sync_metrics
25 27
26 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SYNC_METRICS_H_ 28 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SYNC_METRICS_H_
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_factory.cc ('k') | chrome/browser/password_manager/sync_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698