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

Side by Side Diff: components/test_runner/test_runner.cc

Issue 1921923002: Convert //components/[o-t]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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
« no previous file with comments | « components/test_runner/test_runner.h ('k') | components/test_runner/tracked_dictionary.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/test_runner/test_runner.h" 5 #include "components/test_runner/test_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 #endif 71 #endif
72 72
73 using namespace blink; 73 using namespace blink;
74 74
75 namespace test_runner { 75 namespace test_runner {
76 76
77 namespace { 77 namespace {
78 78
79 WebString V8StringToWebString(v8::Local<v8::String> v8_str) { 79 WebString V8StringToWebString(v8::Local<v8::String> v8_str) {
80 int length = v8_str->Utf8Length() + 1; 80 int length = v8_str->Utf8Length() + 1;
81 scoped_ptr<char[]> chars(new char[length]); 81 std::unique_ptr<char[]> chars(new char[length]);
82 v8_str->WriteUtf8(chars.get(), length); 82 v8_str->WriteUtf8(chars.get(), length);
83 return WebString::fromUTF8(chars.get()); 83 return WebString::fromUTF8(chars.get());
84 } 84 }
85 85
86 double GetDefaultDeviceScaleFactor() { 86 double GetDefaultDeviceScaleFactor() {
87 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 87 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
88 if (command_line->HasSwitch(switches::kForceDeviceScaleFactor)) { 88 if (command_line->HasSwitch(switches::kForceDeviceScaleFactor)) {
89 double scale; 89 double scale;
90 std::string value = 90 std::string value =
91 command_line->GetSwitchValueASCII(switches::kForceDeviceScaleFactor); 91 command_line->GetSwitchValueASCII(switches::kForceDeviceScaleFactor);
(...skipping 3193 matching lines...) Expand 10 before | Expand all | Expand 10 after
3285 } 3285 }
3286 3286
3287 void TestRunner::DidLosePointerLockInternal() { 3287 void TestRunner::DidLosePointerLockInternal() {
3288 bool was_locked = pointer_locked_; 3288 bool was_locked = pointer_locked_;
3289 pointer_locked_ = false; 3289 pointer_locked_ = false;
3290 if (was_locked) 3290 if (was_locked)
3291 web_view_->didLosePointerLock(); 3291 web_view_->didLosePointerLock();
3292 } 3292 }
3293 3293
3294 } // namespace test_runner 3294 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/test_runner.h ('k') | components/test_runner/tracked_dictionary.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698