summaryrefslogtreecommitdiffstats
path: root/ios/web/ui_web_view_util.h
blob: 46b36abab59dd44a2a6c558c206be8d2e8e21001 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef IOS_WEB_UI_WEB_VIEW_UTIL_H_
#define IOS_WEB_UI_WEB_VIEW_UTIL_H_

#include <Foundation/Foundation.h>

namespace web {

// Registers the user agent encoding |request_group_id| in the user defaults.
// This is a utility method, used to workaround crbug.com/228397. Do not use
// it for other purposes.
void BuildAndRegisterUserAgentForUIWebView(NSString* request_group_id,
                                           BOOL use_desktop_user_agent);

// Registers |user_agent| as the user agent string to be used by the UIWebView
// instances that are created from now on.
void RegisterUserAgentForUIWebView(NSString* user_agent);

}  // namespace web

#endif  // IOS_WEB_UI_WEB_VIEW_UTIL_H_