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

Side by Side Diff: chrome/test/chromedriver/command_executor_impl.cc

Issue 15836003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
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/test/chromedriver/command_executor_impl.h" 5 #include "chrome/test/chromedriver/command_executor_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 CommandExecutorImpl::~CommandExecutorImpl() {} 43 CommandExecutorImpl::~CommandExecutorImpl() {}
44 44
45 void CommandExecutorImpl::Init() { 45 void CommandExecutorImpl::Init() {
46 #if defined(OS_MACOSX) 46 #if defined(OS_MACOSX)
47 base::mac::ScopedNSAutoreleasePool autorelease_pool; 47 base::mac::ScopedNSAutoreleasePool autorelease_pool;
48 #endif 48 #endif
49 base::Thread::Options options(base::MessageLoop::TYPE_IO, 0); 49 base::Thread::Options options(base::MessageLoop::TYPE_IO, 0);
50 CHECK(io_thread_.StartWithOptions(options)); 50 CHECK(io_thread_.StartWithOptions(options));
51 context_getter_ = new URLRequestContextGetter( 51 context_getter_ = new URLRequestContextGetter(
52 io_thread_.message_loop_proxy()); 52 io_thread_.message_loop_proxy());
53 socket_factory_ = CreateSyncWebSocketFactory(context_getter_); 53 socket_factory_ = CreateSyncWebSocketFactory(context_getter_.get());
54 adb_.reset(new AdbImpl(io_thread_.message_loop_proxy(), log_)); 54 adb_.reset(new AdbImpl(io_thread_.message_loop_proxy(), log_));
55 device_manager_.reset(new DeviceManager(adb_.get())); 55 device_manager_.reset(new DeviceManager(adb_.get()));
56 56
57 // Commands which require an element id. 57 // Commands which require an element id.
58 typedef std::map<std::string, ElementCommand> ElementCommandMap; 58 typedef std::map<std::string, ElementCommand> ElementCommandMap;
59 ElementCommandMap element_command_map; 59 ElementCommandMap element_command_map;
60 element_command_map[CommandNames::kFindChildElement] = 60 element_command_map[CommandNames::kFindChildElement] =
61 base::Bind(&ExecuteFindChildElement, 50); 61 base::Bind(&ExecuteFindChildElement, 50);
62 element_command_map[CommandNames::kFindChildElements] = 62 element_command_map[CommandNames::kFindChildElements] =
63 base::Bind(&ExecuteFindChildElements, 50); 63 base::Bind(&ExecuteFindChildElements, 50);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 base::SysInfo::OperatingSystemName().c_str(), 298 base::SysInfo::OperatingSystemName().c_str(),
299 base::SysInfo::OperatingSystemVersion().c_str(), 299 base::SysInfo::OperatingSystemVersion().c_str(),
300 base::SysInfo::OperatingSystemArchitecture().c_str())); 300 base::SysInfo::OperatingSystemArchitecture().c_str()));
301 scoped_ptr<base::DictionaryValue> error(new base::DictionaryValue()); 301 scoped_ptr<base::DictionaryValue> error(new base::DictionaryValue());
302 error->SetString("message", status.message()); 302 error->SetString("message", status.message());
303 value->reset(error.release()); 303 value->reset(error.release());
304 } 304 }
305 if (!*value) 305 if (!*value)
306 value->reset(base::Value::CreateNullValue()); 306 value->reset(base::Value::CreateNullValue());
307 } 307 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome/devtools_http_client.cc ('k') | chrome/test/chromedriver/commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698