| Index: content/public/common/content_client.h
|
| diff --git a/content/public/common/content_client.h b/content/public/common/content_client.h
|
| index dd274122313f4cdc306b2c02f374f901f57f1a11..3d558a89ac27ff4927f1ba1e06fe049c01c17b47 100644
|
| --- a/content/public/common/content_client.h
|
| +++ b/content/public/common/content_client.h
|
| @@ -46,15 +46,25 @@ class ContentUtilityClient;
|
| struct GPUInfo;
|
| struct PepperPluginInfo;
|
|
|
| -// Setter and getter for the client. The client should be set early, before any
|
| -// content code is called.
|
| -CONTENT_EXPORT void SetContentClient(ContentClient* client);
|
| +// Initializes the browser with a client and user agent string. This method
|
| +// should be called early on before any other content code is called.
|
| +CONTENT_EXPORT void Initialize(ContentClient* client,
|
| + const std::string& user_agent);
|
| +
|
| +// Uninitializes the browser by removing its reference to the client and
|
| +// resetting the user agent.
|
| +CONTENT_EXPORT void Uninitialize();
|
| +
|
| +// Returns the client being used by the browser. Initialize() must be called
|
| +// prior to calling this method.
|
| CONTENT_EXPORT ContentClient* GetContentClient();
|
|
|
| -// Returns the user agent string being used by the browser. SetContentClient()
|
| -// must be called prior to calling this, and this routine must be used
|
| -// instead of webkit_glue::GetUserAgent() in order to ensure that we use
|
| -// the same user agent string everywhere.
|
| +// Returns the user agent string being used by the browser. Initialize() must
|
| +// be called prior to calling this method.
|
| +//
|
| +// This routine must be used instead of webkit_glue::GetUserAgent() in order to
|
| +// ensure that we use the same user agent string everywhere.
|
| +//
|
| // TODO(dpranke): This is caused by webkit_glue being a library that can
|
| // get linked into multiple linkable objects, causing us to have multiple
|
| // static values of the user agent. This will be fixed when we clean up
|
| @@ -102,11 +112,6 @@ class CONTENT_EXPORT ContentClient {
|
| // behalf of a swapped out renderer.
|
| virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) = 0;
|
|
|
| - // Returns the user agent and a flag indicating whether the returned
|
| - // string should always be used (if false, callers may override the
|
| - // value as needed to work around various user agent sniffing bugs).
|
| - virtual std::string GetUserAgent(bool *overriding) const = 0;
|
| -
|
| // Returns a string resource given its id.
|
| virtual string16 GetLocalizedString(int message_id) const = 0;
|
|
|
|
|