Index: chrome/browser/render_view_context_menu_controller.cc |
=================================================================== |
--- chrome/browser/render_view_context_menu_controller.cc (revision 4189) |
+++ chrome/browser/render_view_context_menu_controller.cc (working copy) |
@@ -6,6 +6,7 @@ |
#include "base/command_line.h" |
#include "base/path_service.h" |
+#include "base/scoped_clipboard_writer.h" |
#include "base/string_util.h" |
#include "chrome/app/chrome_dll_resource.h" |
#include "chrome/common/chrome_paths.h" |
@@ -65,8 +66,8 @@ |
if (!clipboard) |
return; |
- clipboard->Clear(); |
- clipboard->WriteText(text); |
+ ScopedClipboardWriter scw(clipboard); |
+ scw.WriteText(text); |
} |
void RenderViewContextMenuController::WriteURLToClipboard(const GURL& url) { |