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

Side by Side Diff: chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc

Issue 61643006: Adds the ability for MessageLoop to take a MessagePump (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 2 trunk and BASE_EXPORT Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/threading/thread.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 5 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 #if defined(TOOLKIT_GTK) 289 #if defined(TOOLKIT_GTK)
290 case base::MessageLoop::TYPE_GPU: 290 case base::MessageLoop::TYPE_GPU:
291 #endif 291 #endif
292 case base::MessageLoop::TYPE_UI: 292 case base::MessageLoop::TYPE_UI:
293 return BrowserThread::CurrentlyOn(BrowserThread::UI); 293 return BrowserThread::CurrentlyOn(BrowserThread::UI);
294 case base::MessageLoop::TYPE_IO: 294 case base::MessageLoop::TYPE_IO:
295 return BrowserThread::CurrentlyOn(BrowserThread::IO); 295 return BrowserThread::CurrentlyOn(BrowserThread::IO);
296 #if defined(OS_ANDROID) 296 #if defined(OS_ANDROID)
297 case base::MessageLoop::TYPE_JAVA: // fall-through 297 case base::MessageLoop::TYPE_JAVA: // fall-through
298 #endif // defined(OS_ANDROID) 298 #endif // defined(OS_ANDROID)
299 case base::MessageLoop::TYPE_CUSTOM:
299 case base::MessageLoop::TYPE_DEFAULT: 300 case base::MessageLoop::TYPE_DEFAULT:
300 return !BrowserThread::CurrentlyOn(BrowserThread::UI) && 301 return !BrowserThread::CurrentlyOn(BrowserThread::UI) &&
301 !BrowserThread::CurrentlyOn(BrowserThread::IO); 302 !BrowserThread::CurrentlyOn(BrowserThread::IO);
302 } 303 }
303 return false; 304 return false;
304 } 305 }
305 }; 306 };
306 307
307 } // namespace 308 } // namespace
308 309
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 923
923 TEST_F(ProtocolHandlerRegistryTest, MAYBE_TestInstallDefaultHandler) { 924 TEST_F(ProtocolHandlerRegistryTest, MAYBE_TestInstallDefaultHandler) {
924 RecreateRegistry(false); 925 RecreateRegistry(false);
925 registry()->AddPredefinedHandler(CreateProtocolHandler( 926 registry()->AddPredefinedHandler(CreateProtocolHandler(
926 "test", GURL("http://test.com/%s"), "Test")); 927 "test", GURL("http://test.com/%s"), "Test"));
927 registry()->InitProtocolSettings(); 928 registry()->InitProtocolSettings();
928 std::vector<std::string> protocols; 929 std::vector<std::string> protocols;
929 registry()->GetRegisteredProtocols(&protocols); 930 registry()->GetRegisteredProtocols(&protocols);
930 ASSERT_EQ(static_cast<size_t>(1), protocols.size()); 931 ASSERT_EQ(static_cast<size_t>(1), protocols.size());
931 } 932 }
OLDNEW
« no previous file with comments | « base/threading/thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698