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

Side by Side Diff: chrome/renderer/extensions/user_script_scheduler.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/renderer/extensions/user_script_scheduler.h" 5 #include "chrome/renderer/extensions/user_script_scheduler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/common/extensions/extension_manifest_constants.h" 10 #include "chrome/common/extensions/extension_manifest_constants.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 const Extension* extension = dispatcher_->extensions()->GetByID( 140 const Extension* extension = dispatcher_->extensions()->GetByID(
141 params.extension_id); 141 params.extension_id);
142 content::RenderView* render_view = 142 content::RenderView* render_view =
143 content::RenderView::FromWebView(frame_->view()); 143 content::RenderView::FromWebView(frame_->view());
144 ExtensionHelper* extension_helper = ExtensionHelper::Get(render_view); 144 ExtensionHelper* extension_helper = ExtensionHelper::Get(render_view);
145 base::ListValue execution_results; 145 base::ListValue execution_results;
146 146
147 // Since extension info is sent separately from user script info, they can 147 // Since extension info is sent separately from user script info, they can
148 // be out of sync. We just ignore this situation. 148 // be out of sync. We just ignore this situation.
149 if (!extension) { 149 if (!extension) {
150 render_view->Send(new ExtensionHostMsg_ExecuteCodeFinished( 150 render_view->Send(
151 render_view->GetRoutingID(), 151 new ExtensionHostMsg_ExecuteCodeFinished(render_view->GetRoutingID(),
152 params.request_id, 152 params.request_id,
153 "", // no error 153 std::string(), // no error
154 -1, 154 -1,
155 GURL(""), 155 GURL(std::string()),
156 execution_results)); 156 execution_results));
157 return; 157 return;
158 } 158 }
159 159
160 std::vector<WebFrame*> frame_vector; 160 std::vector<WebFrame*> frame_vector;
161 frame_vector.push_back(frame_); 161 frame_vector.push_back(frame_);
162 if (params.all_frames) 162 if (params.all_frames)
163 GetAllChildFrames(frame_, &frame_vector); 163 GetAllChildFrames(frame_, &frame_vector);
164 164
165 std::string error; 165 std::string error;
166 166
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 for (WebFrame* child_frame = parent_frame->firstChild(); child_frame; 266 for (WebFrame* child_frame = parent_frame->firstChild(); child_frame;
267 child_frame = child_frame->nextSibling()) { 267 child_frame = child_frame->nextSibling()) {
268 frames_vector->push_back(child_frame); 268 frames_vector->push_back(child_frame);
269 GetAllChildFrames(child_frame, frames_vector); 269 GetAllChildFrames(child_frame, frames_vector);
270 } 270 }
271 return true; 271 return true;
272 } 272 }
273 273
274 } // namespace extensions 274 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/resource_request_policy.cc ('k') | chrome/renderer/extensions/user_script_slave.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698