1 // Copyright (c) 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 COMPONENTS_AUTO_LOGIN_PARSER_AUTO_LOGIN_PARSER_H_
6 #define COMPONENTS_AUTO_LOGIN_PARSER_AUTO_LOGIN_PARSER_H_
14 namespace auto_login_parser
{
16 enum RealmRestriction
{
25 // "realm" string from x-auto-login (e.g. "com.google").
28 // "account" string from x-auto-login.
31 // "args" string from x-auto-login to be passed to MergeSession. This string
32 // should be considered opaque and not be cracked open to look inside.
36 // Returns whether parsing succeeded. Parameter |header_data| will not be
37 // modified if parsing fails.
38 bool ParseHeader(const std::string
& header
,
39 RealmRestriction realm_restriction
,
40 HeaderData
* header_data
);
42 // Helper function that also retrieves the header from the response of the
44 bool ParserHeaderInResponse(net::URLRequest
* request
,
45 RealmRestriction realm_restriction
,
46 HeaderData
* header_data
);
48 } // namespace auto_login_parser
50 #endif // COMPONENTS_AUTO_LOGIN_PARSER_AUTO_LOGIN_PARSER_H_