Cleanup namespace usage in Source/core/platform/[A-Z]*.h

Cleanup namespace usage in Source/core/platform/[A-Z]*.h

- Merge multiple |namespace blink {}| block
- Remove unnecessary blink:: prefixes
- Make blank lines consistent

BUG=None

Review URL: https://codereview.chromium.org/467193002

git-svn-id: svn://svn.chromium.org/blink/trunk@180218 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e5a00669
......@@ -68,7 +68,7 @@ public:
virtual void didReadDirectoryEntries(bool hasMore) { ASSERT_NOT_REACHED(); }
// Called when an AsyncFileWrter has been created successfully.
virtual void didCreateFileWriter(PassOwnPtr<blink::WebFileWriter>, long long length) { ASSERT_NOT_REACHED(); }
virtual void didCreateFileWriter(PassOwnPtr<WebFileWriter>, long long length) { ASSERT_NOT_REACHED(); }
// Called when there was an error.
virtual void didFail(int code) = 0;
......@@ -91,6 +91,6 @@ private:
bool m_blockUntilCompletion;
};
} // namespace
} // namespace blink
#endif // AsyncFileSystemCallbacks_h
......@@ -10,10 +10,8 @@
#include "public/platform/WebContentDecryptionModuleResult.h"
namespace blink {
class WebString;
}
namespace blink {
class WebString;
// Used to notify completion of a CDM operation.
class ContentDecryptionModuleResult : public GarbageCollectedFinalized<ContentDecryptionModuleResult> {
......@@ -21,12 +19,12 @@ public:
virtual ~ContentDecryptionModuleResult() { }
virtual void complete() = 0;
virtual void completeWithSession(blink::WebContentDecryptionModuleResult::SessionStatus) = 0;
virtual void completeWithError(blink::WebContentDecryptionModuleException, unsigned long systemCode, const blink::WebString&) = 0;
virtual void completeWithSession(WebContentDecryptionModuleResult::SessionStatus) = 0;
virtual void completeWithError(WebContentDecryptionModuleException, unsigned long systemCode, const WebString&) = 0;
blink::WebContentDecryptionModuleResult result()
WebContentDecryptionModuleResult result()
{
return blink::WebContentDecryptionModuleResult(this);
return WebContentDecryptionModuleResult(this);
}
virtual void trace(Visitor*) { }
......
......@@ -72,7 +72,7 @@ struct CookieHash {
return a.name == b.name && a.domain == b.domain && a.path == b.path && a.secure == b.secure;
}
};
}
} // namespace blink
namespace WTF {
template<typename T> struct DefaultHash;
......
......@@ -31,8 +31,8 @@ enum HashAlgorithm {
};
PLATFORM_EXPORT bool computeDigest(HashAlgorithm, const char* digestable, size_t length, DigestValue& digestResult);
PLATFORM_EXPORT PassOwnPtr<blink::WebCryptoDigestor> createDigestor(HashAlgorithm);
PLATFORM_EXPORT void finishDigestor(blink::WebCryptoDigestor*, DigestValue& digestResult);
PLATFORM_EXPORT PassOwnPtr<WebCryptoDigestor> createDigestor(HashAlgorithm);
PLATFORM_EXPORT void finishDigestor(WebCryptoDigestor*, DigestValue& digestResult);
} // namespace blink
......
......@@ -41,17 +41,17 @@ class CryptoResult : public ThreadSafeRefCounted<CryptoResult> {
public:
virtual ~CryptoResult() { }
virtual void completeWithError(blink::WebCryptoErrorType, const blink::WebString&) = 0;
virtual void completeWithBuffer(const blink::WebArrayBuffer&) = 0;
virtual void completeWithError(WebCryptoErrorType, const WebString&) = 0;
virtual void completeWithBuffer(const WebArrayBuffer&) = 0;
virtual void completeWithJson(const char* utf8Data, unsigned length) = 0;
virtual void completeWithBoolean(bool) = 0;
virtual void completeWithKey(const blink::WebCryptoKey&) = 0;
virtual void completeWithKeyPair(const blink::WebCryptoKey& publicKey, const blink::WebCryptoKey& privateKey) = 0;
virtual void completeWithKey(const WebCryptoKey&) = 0;
virtual void completeWithKeyPair(const WebCryptoKey& publicKey, const WebCryptoKey& privateKey) = 0;
virtual bool cancelled() const = 0;
blink::WebCryptoResult result()
WebCryptoResult result()
{
return blink::WebCryptoResult(this);
return WebCryptoResult(this);
}
};
......
......@@ -70,7 +70,7 @@ public:
const char* argNames[],
const unsigned char argTypes[],
const unsigned long long argValues[],
blink::TraceEvent::ConvertableToTraceFormat*[],
TraceEvent::ConvertableToTraceFormat*[],
unsigned char flags);
static TraceEvent::TraceEventHandle addTraceEvent(char phase,
const unsigned char* categoryEnabledFlag,
......
......@@ -30,15 +30,12 @@
#include "wtf/FastAllocBase.h"
#include "wtf/Noncopyable.h"
namespace blink {
struct WebScreenInfo;
}
namespace blink {
class Cursor;
class IntPoint;
class IntRect;
class IntSize;
struct WebScreenInfo;
class PLATFORM_EXPORT HostWindow {
WTF_MAKE_NONCOPYABLE(HostWindow); WTF_MAKE_FAST_ALLOCATED;
......@@ -57,7 +54,7 @@ public:
// Methods for doing coordinate conversions to screen coordinates.
virtual IntRect rootViewToScreen(const IntRect&) const = 0;
virtual blink::WebScreenInfo screenInfo() const = 0;
virtual WebScreenInfo screenInfo() const = 0;
virtual void scheduleAnimation() = 0;
};
......
......@@ -35,7 +35,7 @@
namespace blink {
PLATFORM_EXPORT WTFLogChannel* notImplementedLoggingChannel();
}
} // namespace blink
#define notImplemented() do { \
static bool havePrinted = false; \
......
......@@ -60,10 +60,10 @@ namespace blink {
// enabled. This requires the following template specializations to be
// available:
//
// template<> struct blink::ValueToString<T> {
// template<> struct ValueToString<T> {
// static String string(const T& t);
// };
// template<> struct blink::ValueToString<UserData> {
// template<> struct ValueToString<UserData> {
// static String string(const UserData& t);
// };
//
......
......@@ -44,7 +44,7 @@
// In debug mode, printing of the data contained in the tree is
// enabled. This requires the template specialization to be available:
//
// template<> struct blink::ValueToString<T> {
// template<> struct ValueToString<T> {
// static String string(const T& t);
// };
//
......
......@@ -47,7 +47,7 @@ PLATFORM_EXPORT FloatRect screenAvailableRect(Widget*);
PLATFORM_EXPORT void screenColorProfile(ColorProfile&);
PLATFORM_EXPORT uint16_t screenOrientationAngle(Widget*);
PLATFORM_EXPORT blink::WebScreenOrientationType screenOrientationType(Widget*);
PLATFORM_EXPORT WebScreenOrientationType screenOrientationType(Widget*);
} // namespace blink
......
......@@ -40,10 +40,6 @@ namespace blink {
class WebDiscardableMemory;
} // namespace blink
namespace blink {
// A simple vector implementation that supports purgeable memory. The vector is
// already locked at construction and locking uses an internal counter which
// means that N calls to lock() must be followed by N+1 calls to unlock() to
......@@ -115,7 +111,7 @@ private:
// Note that there can't be data both in |m_vector| and
// |m_discardable|, i.e. only one of them is used at a given time.
Vector<char> m_vector;
OwnPtr<blink::WebDiscardableMemory> m_discardable;
OwnPtr<WebDiscardableMemory> m_discardable;
size_t m_discardableCapacity;
size_t m_discardableSize;
bool m_isPurgeable;
......
......@@ -46,7 +46,7 @@ public:
virtual void didQueryStorageUsageAndQuota(unsigned long long usageInBytes, unsigned long long quotaInBytes) { ASSERT_NOT_REACHED(); };
virtual void didGrantStorageQuota(unsigned long long usageInBytes, unsigned long long grantedQuotaInBytes) { ASSERT_NOT_REACHED(); };
virtual void didFail(blink::WebStorageQuotaError) { ASSERT_NOT_REACHED(); };
virtual void didFail(WebStorageQuotaError) { ASSERT_NOT_REACHED(); };
};
} // namespace blink
......
......@@ -284,12 +284,12 @@ public:
};
template<typename T>
struct ThreadingTrait<blink::SupplementBase<T, true> > {
struct ThreadingTrait<SupplementBase<T, true> > {
static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity;
};
template<typename T>
struct ThreadingTrait<blink::SupplementableBase<T, true> > {
struct ThreadingTrait<SupplementableBase<T, true> > {
static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity;
};
......
......@@ -36,7 +36,7 @@
namespace blink {
class Task : public blink::WebThread::Task {
class Task : public WebThread::Task {
public:
explicit Task(const Closure& closure)
: m_closure(closure)
......
......@@ -37,12 +37,12 @@
namespace blink {
class TestingDiscardableMemory : public blink::WebDiscardableMemory {
class TestingDiscardableMemory : public WebDiscardableMemory {
public:
explicit TestingDiscardableMemory(size_t);
virtual ~TestingDiscardableMemory();
// blink::WebDiscardableMemory:
// WebDiscardableMemory:
virtual bool lock() OVERRIDE;
virtual void* data() OVERRIDE;
virtual void unlock() OVERRIDE;
......@@ -52,7 +52,7 @@ private:
bool m_isLocked;
};
class TestingPlatformSupport : public blink::Platform {
class TestingPlatformSupport : public Platform {
public:
struct Config {
Config() : hasDiscardableMemorySupport(false) { }
......@@ -64,14 +64,14 @@ public:
virtual ~TestingPlatformSupport();
// blink::Platform:
virtual blink::WebDiscardableMemory* allocateAndLockDiscardableMemory(size_t bytes) OVERRIDE;
// Platform:
virtual WebDiscardableMemory* allocateAndLockDiscardableMemory(size_t bytes) OVERRIDE;
virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t length) OVERRIDE;
virtual const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName) OVERRIDE;
private:
const Config m_config;
blink::Platform* const m_oldPlatform;
Platform* const m_oldPlatform;
};
} // namespace blink
......
......@@ -34,6 +34,6 @@ private:
};
#define FROM_HERE ::blink::TraceLocation(__FUNCTION__, __FILE__)
}
} // namespace blink
#endif // TraceLocation_h
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