Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: webkit/glue/webkit_glue.h

Issue 19025: Add support for UA spoofing, and spoof Safari's UA string when loading URLs... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_GLUE_WEBKIT_GLUE_H_ 5 #ifndef WEBKIT_GLUE_WEBKIT_GLUE_H_
6 #define WEBKIT_GLUE_WEBKIT_GLUE_H_ 6 #define WEBKIT_GLUE_WEBKIT_GLUE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 // Returns the WebKit version (major.minor). 100 // Returns the WebKit version (major.minor).
101 std::string GetWebKitVersion(); 101 std::string GetWebKitVersion();
102 102
103 // Called to override the default user agent with a custom one. Call this 103 // Called to override the default user agent with a custom one. Call this
104 // before anyone actually asks for the user agent in order to prevent 104 // before anyone actually asks for the user agent in order to prevent
105 // inconsistent behavior. 105 // inconsistent behavior.
106 void SetUserAgent(const std::string& new_user_agent); 106 void SetUserAgent(const std::string& new_user_agent);
107 107
108 // Returns the user agent, which is usually the default user agent but may be 108 // Returns the user agent, which is usually the default user agent but may be
109 // overriden by a call to SetUserAgent() (which should be done at startup). 109 // overriden by a call to SetUserAgent() (which should be done at startup).
wtc 2009/01/27 19:19:24 Nit: the comment should be updated to mention the
110 const std::string& GetUserAgent(); 110 const std::string& GetUserAgent(const GURL& url);
111 111
112 // Creates serialized state for the specified URL. This is a variant of 112 // Creates serialized state for the specified URL. This is a variant of
113 // HistoryItemToString (in glue_serialize) that is used during session restore 113 // HistoryItemToString (in glue_serialize) that is used during session restore
114 // if the saved state is empty. 114 // if the saved state is empty.
115 std::string CreateHistoryStateForURL(const GURL& url); 115 std::string CreateHistoryStateForURL(const GURL& url);
116 116
117 #ifndef NDEBUG 117 #ifndef NDEBUG
118 // Checks various important objects to see if there are any in memory, and 118 // Checks various important objects to see if there are any in memory, and
119 // calls AppendToLog with any leaked objects. Designed to be called on shutdown 119 // calls AppendToLog with any leaked objects. Designed to be called on shutdown
120 void CheckForLeaks(); 120 void CheckForLeaks();
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // coloring. 276 // coloring.
277 uint64 VisitedLinkHash(const char* canonical_url, size_t length); 277 uint64 VisitedLinkHash(const char* canonical_url, size_t length);
278 278
279 // Returns whether the given link hash is in the user's history. The hash must 279 // Returns whether the given link hash is in the user's history. The hash must
280 // have been generated by calling VisitedLinkHash(). 280 // have been generated by calling VisitedLinkHash().
281 bool IsLinkVisited(uint64 link_hash); 281 bool IsLinkVisited(uint64 link_hash);
282 282
283 } // namespace webkit_glue 283 } // namespace webkit_glue
284 284
285 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ 285 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698