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

Side by Side Diff: content/public/test/test_utils.cc

Issue 102593002: Convert string16 to base::string16 in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « content/public/test/test_renderer_host.h ('k') | content/renderer/android/address_detector.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 (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 "content/public/test/test_utils.h" 5 #include "content/public/test/test_utils.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 return base::Bind(&DeferredQuitRunLoop, run_loop->QuitClosure(), 130 return base::Bind(&DeferredQuitRunLoop, run_loop->QuitClosure(),
131 kNumQuitDeferrals); 131 kNumQuitDeferrals);
132 } 132 }
133 133
134 scoped_ptr<base::Value> ExecuteScriptAndGetValue( 134 scoped_ptr<base::Value> ExecuteScriptAndGetValue(
135 RenderViewHost* render_view_host, 135 RenderViewHost* render_view_host,
136 const std::string& script) { 136 const std::string& script) {
137 ScriptCallback observer; 137 ScriptCallback observer;
138 138
139 render_view_host->ExecuteJavascriptInWebFrameCallbackResult( 139 render_view_host->ExecuteJavascriptInWebFrameCallbackResult(
140 string16(), // frame_xpath, 140 base::string16(), // frame_xpath,
141 UTF8ToUTF16(script), 141 UTF8ToUTF16(script),
142 base::Bind(&ScriptCallback::ResultCallback, base::Unretained(&observer))); 142 base::Bind(&ScriptCallback::ResultCallback, base::Unretained(&observer)));
143 base::MessageLoop* loop = base::MessageLoop::current(); 143 base::MessageLoop* loop = base::MessageLoop::current();
144 loop->Run(); 144 loop->Run();
145 return observer.result().Pass(); 145 return observer.result().Pass();
146 } 146 }
147 147
148 MessageLoopRunner::MessageLoopRunner() 148 MessageLoopRunner::MessageLoopRunner()
149 : loop_running_(false), 149 : loop_running_(false),
150 quit_closure_called_(false) { 150 quit_closure_called_(false) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 seen_ = true; 237 seen_ = true;
238 if (!running_) 238 if (!running_)
239 return; 239 return;
240 240
241 message_loop_runner_->Quit(); 241 message_loop_runner_->Quit();
242 running_ = false; 242 running_ = false;
243 } 243 }
244 244
245 } // namespace content 245 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_renderer_host.h ('k') | content/renderer/android/address_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698