diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-01 18:22:08 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-01 18:22:08 +0000 |
commit | 99456fa405621e0bccaae65119f46f1e290f4c71 (patch) | |
tree | 3514ad98d02e925a952340c88be176890897332d /content/browser/hyphenator | |
parent | 9afd71dd7a1cfc7ef8286c881f0eaf1e659fb006 (diff) | |
download | chromium_src-99456fa405621e0bccaae65119f46f1e290f4c71.zip chromium_src-99456fa405621e0bccaae65119f46f1e290f4c71.tar.gz chromium_src-99456fa405621e0bccaae65119f46f1e290f4c71.tar.bz2 |
content/browser: Remove more unnecessary content:: calls.
R=jam@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11343062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/hyphenator')
-rw-r--r-- | content/browser/hyphenator/hyphenator_message_filter.cc | 14 | ||||
-rw-r--r-- | content/browser/hyphenator/hyphenator_message_filter_unittest.cc | 26 |
2 files changed, 20 insertions, 20 deletions
diff --git a/content/browser/hyphenator/hyphenator_message_filter.cc b/content/browser/hyphenator/hyphenator_message_filter.cc index 2132f76..3547490 100644 --- a/content/browser/hyphenator/hyphenator_message_filter.cc +++ b/content/browser/hyphenator/hyphenator_message_filter.cc @@ -13,22 +13,22 @@ #include "content/public/browser/content_browser_client.h" #include "content/public/browser/render_process_host.h" +namespace content { + namespace { // A helper function that closes the specified file in the FILE thread. This // function may be called after the HyphenatorMessageFilter object that owns the // specified file is deleted, i.e. this function must not depend on the object. void CloseDictionary(base::PlatformFile file) { - DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); base::ClosePlatformFile(file); } } // namespace -namespace content { - HyphenatorMessageFilter::HyphenatorMessageFilter( - content::RenderProcessHost* render_process_host) + RenderProcessHost* render_process_host) : render_process_host_(render_process_host), dictionary_file_(base::kInvalidPlatformFileValue), weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { @@ -38,7 +38,7 @@ HyphenatorMessageFilter::~HyphenatorMessageFilter() { // Post a FILE task that deletes the dictionary file. This message filter is // usually deleted on the IO thread, which does not allow file operations. if (dictionary_file_ != base::kInvalidPlatformFileValue) { - content::BrowserThread::PostTask( + BrowserThread::PostTask( BrowserThread::FILE, FROM_HERE, base::Bind(&CloseDictionary, dictionary_file_)); @@ -74,8 +74,8 @@ void HyphenatorMessageFilter::OnOpenDictionary(const string16& locale) { SendDictionary(); return; } - content::BrowserThread::PostTaskAndReply( - content::BrowserThread::FILE, + BrowserThread::PostTaskAndReply( + BrowserThread::FILE, FROM_HERE, base::Bind(&HyphenatorMessageFilter::OpenDictionary, this, locale), base::Bind(&HyphenatorMessageFilter::SendDictionary, diff --git a/content/browser/hyphenator/hyphenator_message_filter_unittest.cc b/content/browser/hyphenator/hyphenator_message_filter_unittest.cc index eff459e..2c047b8 100644 --- a/content/browser/hyphenator/hyphenator_message_filter_unittest.cc +++ b/content/browser/hyphenator/hyphenator_message_filter_unittest.cc @@ -21,10 +21,10 @@ namespace content { // A class derived from the HyphenatorMessageFilter class used in unit tests. // This class overrides some methods so we can test the HyphenatorMessageFilter // class without posting tasks. -class TestHyphenatorMessageFilter : public content::HyphenatorMessageFilter { +class TestHyphenatorMessageFilter : public HyphenatorMessageFilter { public: - explicit TestHyphenatorMessageFilter(content::RenderProcessHost* host) - : content::HyphenatorMessageFilter(host), + explicit TestHyphenatorMessageFilter(RenderProcessHost* host) + : HyphenatorMessageFilter(host), type_(0), file_(base::kInvalidPlatformFileValue) { } @@ -33,7 +33,7 @@ class TestHyphenatorMessageFilter : public content::HyphenatorMessageFilter { uint32 type() const { return type_; } base::PlatformFile file() const { return file_; } - // content::BrowserMessageFilter implementation. + // BrowserMessageFilter implementation. virtual bool Send(IPC::Message* message) OVERRIDE { if (message->type() != HyphenatorMsg_SetDictionary::ID) return false; @@ -71,7 +71,7 @@ class TestHyphenatorMessageFilter : public content::HyphenatorMessageFilter { virtual ~TestHyphenatorMessageFilter() { } - // content::HyphenatorMessageFilter implementation. This function emulates the + // HyphenatorMessageFilter implementation. This function emulates the // original implementation without posting a task. virtual void OnOpenDictionary(const string16& locale) OVERRIDE { locale_ = locale; @@ -85,21 +85,19 @@ class TestHyphenatorMessageFilter : public content::HyphenatorMessageFilter { base::PlatformFile file_; }; -} // namespace content - class HyphenatorMessageFilterTest : public testing::Test { public: HyphenatorMessageFilterTest() { - context_.reset(new content::TestBrowserContext); - host_.reset(new content::MockRenderProcessHost(context_.get())); - filter_ = new content::TestHyphenatorMessageFilter(host_.get()); + context_.reset(new TestBrowserContext); + host_.reset(new MockRenderProcessHost(context_.get())); + filter_ = new TestHyphenatorMessageFilter(host_.get()); } virtual ~HyphenatorMessageFilterTest() {} - scoped_ptr<content::TestBrowserContext> context_; - scoped_ptr<content::MockRenderProcessHost> host_; - scoped_refptr<content::TestHyphenatorMessageFilter> filter_; + scoped_ptr<TestBrowserContext> context_; + scoped_ptr<MockRenderProcessHost> host_; + scoped_refptr<TestHyphenatorMessageFilter> filter_; }; // Verifies IPC messages sent by the HyphenatorMessageFilter class when it @@ -153,3 +151,5 @@ TEST_F(HyphenatorMessageFilterTest, OpenDictionary) { if (file != base::kInvalidPlatformFileValue) base::ClosePlatformFile(file); } + +} // namespace content |