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

Side by Side Diff: chrome/browser/extensions/script_executor.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/browser/extensions/script_executor.h" 5 #include "chrome/browser/extensions/script_executor.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/pickle.h" 9 #include "base/pickle.h"
10 #include "chrome/common/extensions/extension_messages.h" 10 #include "chrome/common/extensions/extension_messages.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 IPC_BEGIN_MESSAGE_MAP(Handler, message) 60 IPC_BEGIN_MESSAGE_MAP(Handler, message)
61 IPC_MESSAGE_HANDLER(ExtensionHostMsg_ExecuteCodeFinished, 61 IPC_MESSAGE_HANDLER(ExtensionHostMsg_ExecuteCodeFinished,
62 OnExecuteCodeFinished) 62 OnExecuteCodeFinished)
63 IPC_END_MESSAGE_MAP() 63 IPC_END_MESSAGE_MAP()
64 return true; 64 return true;
65 } 65 }
66 66
67 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE { 67 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE {
68 base::ListValue val; 68 base::ListValue val;
69 callback_.Run(kRendererDestroyed, -1, GURL(""), val); 69 callback_.Run(kRendererDestroyed, -1, GURL(std::string()), val);
70 delete this; 70 delete this;
71 } 71 }
72 72
73 private: 73 private:
74 void OnExecuteCodeFinished(int request_id, 74 void OnExecuteCodeFinished(int request_id,
75 const std::string& error, 75 const std::string& error,
76 int32 on_page_id, 76 int32 on_page_id,
77 const GURL& on_url, 77 const GURL& on_url,
78 const base::ListValue& script_result) { 78 const base::ListValue& script_result) {
79 if (script_observers_ && error.empty()) { 79 if (script_observers_ && error.empty()) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 params.all_frames = (frame_scope == ALL_FRAMES); 125 params.all_frames = (frame_scope == ALL_FRAMES);
126 params.run_at = static_cast<int>(run_at); 126 params.run_at = static_cast<int>(run_at);
127 params.in_main_world = (world_type == MAIN_WORLD); 127 params.in_main_world = (world_type == MAIN_WORLD);
128 params.is_web_view = is_web_view; 128 params.is_web_view = is_web_view;
129 129
130 // Handler handles IPCs and deletes itself on completion. 130 // Handler handles IPCs and deletes itself on completion.
131 new Handler(script_observers_, web_contents_, params, callback); 131 new Handler(script_observers_, web_contents_, params, callback);
132 } 132 }
133 133
134 } // namespace extensions 134 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698