roll libyuv from 1483 to 1487
[chromium-blink-merge.git] / ios / chrome / browser / signin / signin_util.h
blobd743688220e34167916371c15dae490edd826329
1 // Copyright 2013 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 IOS_CHROME_BROWSER_SIGNIN_SIGNIN_UTIL_H_
6 #define IOS_CHROME_BROWSER_SIGNIN_SIGNIN_UTIL_H_
8 #include <Foundation/Foundation.h>
10 #include <set>
11 #include <string>
13 @class ChromeIdentity;
15 // Returns an NSArray of |scopes| as NSStrings.
16 NSArray* GetScopeArray(const std::set<std::string>& scopes);
18 // Returns the canonicalized and sanitized user email for the given identity.
19 // Returns nil if the identity does not have any user email.
20 std::string GetCanonicalizedEmailForIdentity(ChromeIdentity* identity);
22 // Returns whether the given signin |error| should be handled.
24 // Note that cancel errors and errors handled internally by the signin component
25 // should not be handled.
26 bool ShouldHandleSigninError(NSError* error);
28 #endif // IOS_CHROME_BROWSER_SIGNIN_SIGNIN_UTIL_H_