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

Unified Diff: chrome/browser/policy/device_management_service.cc

Issue 5293005: Make the device management service send a proper user agent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/device_management_service.cc
diff --git a/chrome/browser/policy/device_management_service.cc b/chrome/browser/policy/device_management_service.cc
index e391042038f9ad04ba85104a75d911403992add1..05c8789cdeebaa117353eb96fd633dbb656e6528 100644
--- a/chrome/browser/policy/device_management_service.cc
+++ b/chrome/browser/policy/device_management_service.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/net/chrome_net_log.h"
#include "chrome/browser/policy/device_management_backend_impl.h"
#include "chrome/common/net/url_request_context_getter.h"
+#include "webkit/glue/webkit_glue.h"
namespace policy {
@@ -31,6 +32,10 @@ class DeviceManagementRequestContext : public URLRequestContext {
public:
explicit DeviceManagementRequestContext(URLRequestContext* base_context);
virtual ~DeviceManagementRequestContext();
+
+ private:
+ // Overriden from URLRequestContext.
+ virtual const std::string& GetUserAgent(const GURL& url) const;
};
DeviceManagementRequestContext::DeviceManagementRequestContext(
@@ -60,6 +65,11 @@ DeviceManagementRequestContext::~DeviceManagementRequestContext() {
delete http_auth_handler_factory_;
}
+const std::string& DeviceManagementRequestContext::GetUserAgent(
+ const GURL& url) const {
+ return webkit_glue::GetUserAgent(url);
+}
+
// Request context holder.
class DeviceManagementRequestContextGetter : public URLRequestContextGetter {
public:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698