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.
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_SYNC_METRICS_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_SYNC_METRICS_H_
12 namespace password_manager_sync_metrics
{
14 // Returns the sync username for |profile|. Returns an empty string if the
15 // |profile| isn't syncing. This function tries to return an empty string if
16 // the user isn't syncing passwords, but it is not always possibly to determine
17 // since this code can be called during sync setup (http://crbug.com/393626).
18 std::string
GetSyncUsername(Profile
* profile
);
20 // Returns true if |username| and |origin| correspond to the account which is
21 // syncing. Will return false if |profile| is not syncing.
22 bool IsSyncAccountCredential(Profile
* profile
,
23 const std::string
& username
,
24 const std::string
& origin
);
26 } // namespace password_manager_sync_metrics
28 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SYNC_METRICS_H_