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

Unified Diff: ui/base/clipboard/scoped_clipboard_writer.h

Issue 558913003: Remove clipboard argument from ScopedClipboardWriter constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/clipboard/clipboard_unittest.cc ('k') | ui/base/clipboard/scoped_clipboard_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/scoped_clipboard_writer.h
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
index a1234ae91832af9e6a5c5e546c6087211f2f208a..ab799bd65cee9d33baed728ffd86df58dedc3ce1 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.h
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
@@ -4,7 +4,7 @@
// This file declares the ScopedClipboardWriter class, a wrapper around
// the Clipboard class which simplifies writing data to the system clipboard.
-// Upon deletion the class atomically writes all data to |clipboard_|,
+// Upon deletion the class atomically writes all data to the clipboard,
// avoiding any potential race condition with other processes that are also
// writing to the system clipboard.
@@ -25,8 +25,9 @@ namespace ui {
// into a Clipboard::ObjectMap.
class UI_BASE_EXPORT ScopedClipboardWriter {
public:
- // Create an instance that is a simple wrapper around clipboard.
- ScopedClipboardWriter(Clipboard* clipboard, ClipboardType type);
+ // Create an instance that is a simple wrapper around the clipboard of the
+ // given type.
+ explicit ScopedClipboardWriter(ClipboardType type);
~ScopedClipboardWriter();
@@ -71,8 +72,7 @@ class UI_BASE_EXPORT ScopedClipboardWriter {
// We accumulate the data passed to the various targets in the |objects_|
// vector, and pass it to Clipboard::WriteObjects() during object destruction.
Clipboard::ObjectMap objects_;
sky 2014/09/17 15:41:50 style guide says members should be private.
dcheng 2014/09/17 17:10:48 Yeah, ScopedClipboardWriterGlue directly modifies
- Clipboard* clipboard_;
- ClipboardType type_;
+ const ClipboardType type_;
// We keep around the UTF-8 text of the URL in order to pass it to
// Clipboard::DidWriteURL().
« no previous file with comments | « ui/base/clipboard/clipboard_unittest.cc ('k') | ui/base/clipboard/scoped_clipboard_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698