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

Unified Diff: content/common/content_client.cc

Issue 8336007: Move content_client.h into content/public. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add back a needed include. Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/content_client.h ('k') | content/common/gpu/gpu_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/content_client.cc
diff --git a/content/common/content_client.cc b/content/common/content_client.cc
deleted file mode 100644
index ed46636e8b2c7984b802e54f1c4807ac8fb5f3cc..0000000000000000000000000000000000000000
--- a/content/common/content_client.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2011 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.
-
-#include "content/common/content_client.h"
-
-#include "base/logging.h"
-#include "base/string_piece.h"
-#include "webkit/glue/webkit_glue.h"
-
-namespace content {
-
-static ContentClient* g_client;
-
-void SetContentClient(ContentClient* client) {
- g_client = client;
-
- // TODO(dpranke): Doing real work (calling webkit_glue::SetUserAgent)
- // inside what looks like a function that initializes a global is a
- // bit odd, but we need to make sure this is done before
- // webkit_glue::GetUserAgent() is called (so that the UA doesn't change).
- //
- // It would be cleaner if we could rename this to something like a
- // content::Initialize(). Maybe we can merge this into ContentMain() somehow?
- if (client) {
- bool custom = false;
- std::string ua = client->GetUserAgent(&custom);
- webkit_glue::SetUserAgent(ua, custom);
- }
-}
-
-ContentClient* GetContentClient() {
- return g_client;
-}
-
-const std::string& GetUserAgent(const GURL& url) {
- DCHECK(g_client);
- return webkit_glue::GetUserAgent(url);
-}
-
-ContentClient::ContentClient()
- : browser_(NULL), plugin_(NULL), renderer_(NULL), utility_(NULL) {
-}
-
-ContentClient::~ContentClient() {
-}
-
-} // namespace content
« no previous file with comments | « content/common/content_client.h ('k') | content/common/gpu/gpu_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698