Commit b8d076c1 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Avoid importing base::Time into the global scope because X11

base::Time in the global scope collides with X11 headers which
have a global typedef of Time to int. This patch moves the code so
that the symbols are imported into the local namespace (content)
instead.

X11 headers appear in some non-standard jumbo configurations
(extremely large jumbo chunks) but could happen at any time
otherwise as well.

Bug: 746953
Change-Id: Iadc929ca4eb7d556490d58c791bbe8b2ef119726
Reviewed-on: https://chromium-review.googlesource.com/848916
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526731}
parent db9c8460
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include "content/public/browser/histogram_fetcher.h" #include "content/public/browser/histogram_fetcher.h"
#include "content/public/common/content_constants.h" #include "content/public/common/content_constants.h"
namespace content {
using base::Time; using base::Time;
using base::TimeDelta; using base::TimeDelta;
using base::TimeTicks; using base::TimeTicks;
...@@ -36,8 +38,6 @@ static const int kNeverUsableSequenceNumber = -2; ...@@ -36,8 +38,6 @@ static const int kNeverUsableSequenceNumber = -2;
} // anonymous namespace } // anonymous namespace
namespace content {
// The "RequestContext" structure describes an individual request received from // The "RequestContext" structure describes an individual request received from
// the UI. All methods are accessible on UI thread. // the UI. All methods are accessible on UI thread.
class HistogramSynchronizer::RequestContext { class HistogramSynchronizer::RequestContext {
......
...@@ -123,15 +123,15 @@ ...@@ -123,15 +123,15 @@
#include "url/third_party/mozilla/url_parse.h" #include "url/third_party/mozilla/url_parse.h"
#include "url/url_constants.h" #include "url/url_constants.h"
// ----------------------------------------------------------------------------
namespace content {
using base::Time; using base::Time;
using base::TimeDelta; using base::TimeDelta;
using base::TimeTicks; using base::TimeTicks;
using storage::ShareableFileReference; using storage::ShareableFileReference;
// ----------------------------------------------------------------------------
namespace content {
namespace { namespace {
static ResourceDispatcherHostImpl* g_resource_dispatcher_host; static ResourceDispatcherHostImpl* g_resource_dispatcher_host;
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include "ui/events/event.h" #include "ui/events/event.h"
#include "ui/events/keycodes/keyboard_codes.h" #include "ui/events/keycodes/keyboard_codes.h"
namespace content {
using base::Time; using base::Time;
using base::TimeDelta; using base::TimeDelta;
using base::TimeTicks; using base::TimeTicks;
...@@ -45,7 +47,6 @@ using blink::WebMouseWheelEvent; ...@@ -45,7 +47,6 @@ using blink::WebMouseWheelEvent;
using blink::WebTouchEvent; using blink::WebTouchEvent;
using ui::WebInputEventTraits; using ui::WebInputEventTraits;
namespace content {
namespace { namespace {
bool WasHandled(InputEventAckState state) { bool WasHandled(InputEventAckState state) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment