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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/session.h" 5 #include "chrome/test/chromedriver/session.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/test/chromedriver/chrome/chrome.h" 10 #include "chrome/test/chromedriver/chrome/chrome.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void Session::SwitchToSubFrame(const std::string& frame_id, 60 void Session::SwitchToSubFrame(const std::string& frame_id,
61 const std::string& chromedriver_frame_id) { 61 const std::string& chromedriver_frame_id) {
62 std::string parent_frame_id; 62 std::string parent_frame_id;
63 if (!frames.empty()) 63 if (!frames.empty())
64 parent_frame_id = frames.back().frame_id; 64 parent_frame_id = frames.back().frame_id;
65 frames.push_back(FrameInfo(parent_frame_id, frame_id, chromedriver_frame_id)); 65 frames.push_back(FrameInfo(parent_frame_id, frame_id, chromedriver_frame_id));
66 } 66 }
67 67
68 std::string Session::GetCurrentFrameId() const { 68 std::string Session::GetCurrentFrameId() const {
69 if (frames.empty()) 69 if (frames.empty())
70 return ""; 70 return std::string();
71 return frames.back().frame_id; 71 return frames.back().frame_id;
72 } 72 }
73 73
74 scoped_ptr<base::DictionaryValue> Session::CreateCapabilities() { 74 scoped_ptr<base::DictionaryValue> Session::CreateCapabilities() {
75 scoped_ptr<base::DictionaryValue> caps(new base::DictionaryValue()); 75 scoped_ptr<base::DictionaryValue> caps(new base::DictionaryValue());
76 caps->SetString("browserName", "chrome"); 76 caps->SetString("browserName", "chrome");
77 caps->SetString("version", chrome->GetVersion()); 77 caps->SetString("version", chrome->GetVersion());
78 caps->SetString("driverVersion", kChromeDriverVersion); 78 caps->SetString("driverVersion", kChromeDriverVersion);
79 caps->SetString("platform", chrome->GetOperatingSystemName()); 79 caps->SetString("platform", chrome->GetOperatingSystemName());
80 caps->SetBoolean("javascriptEnabled", true); 80 caps->SetBoolean("javascriptEnabled", true);
(...skipping 17 matching lines...) Expand all
98 Session* SessionAccessorImpl::Access(scoped_ptr<base::AutoLock>* lock) { 98 Session* SessionAccessorImpl::Access(scoped_ptr<base::AutoLock>* lock) {
99 lock->reset(new base::AutoLock(session_lock_)); 99 lock->reset(new base::AutoLock(session_lock_));
100 return session_.get(); 100 return session_.get();
101 } 101 }
102 102
103 void SessionAccessorImpl::DeleteSession() { 103 void SessionAccessorImpl::DeleteSession() {
104 session_.reset(); 104 session_.reset();
105 } 105 }
106 106
107 SessionAccessorImpl::~SessionAccessorImpl() {} 107 SessionAccessorImpl::~SessionAccessorImpl() {}
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/server/http_handler_unittest.cc ('k') | chrome/test/chromedriver/session_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698