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

Side by Side Diff: third_party/WebKit/Source/core/clipboard/Pasteboard.cpp

Issue 2858963002: Replace ASSERT with DCHECK in core/ (Closed)
Patch Set: WorkerBackingThread Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 ReplaceNewlinesWithWindowsStyleNewlines(plain_text); 66 ReplaceNewlinesWithWindowsStyleNewlines(plain_text);
67 Platform::Current()->Clipboard()->WritePlainText(plain_text); 67 Platform::Current()->Clipboard()->WritePlainText(plain_text);
68 #else 68 #else
69 Platform::Current()->Clipboard()->WritePlainText(text); 69 Platform::Current()->Clipboard()->WritePlainText(text);
70 #endif 70 #endif
71 } 71 }
72 72
73 void Pasteboard::WriteImage(Image* image, 73 void Pasteboard::WriteImage(Image* image,
74 const KURL& url, 74 const KURL& url,
75 const String& title) { 75 const String& title) {
76 ASSERT(image); 76 DCHECK(image);
77 77
78 const WebImage web_image(image); 78 const WebImage web_image(image);
79 if (web_image.IsNull()) 79 if (web_image.IsNull())
80 return; 80 return;
81 81
82 Platform::Current()->Clipboard()->WriteImage(web_image, WebURL(url), 82 Platform::Current()->Clipboard()->WriteImage(web_image, WebURL(url),
83 WebString(title)); 83 WebString(title));
84 } 84 }
85 85
86 void Pasteboard::WriteDataObject(DataObject* data_object) { 86 void Pasteboard::WriteDataObject(DataObject* data_object) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 #if OS(WIN) 127 #if OS(WIN)
128 ReplaceNewlinesWithWindowsStyleNewlines(text); 128 ReplaceNewlinesWithWindowsStyleNewlines(text);
129 #endif 129 #endif
130 ReplaceNBSPWithSpace(text); 130 ReplaceNBSPWithSpace(text);
131 131
132 Platform::Current()->Clipboard()->WriteHTML(markup, document_url, text, 132 Platform::Current()->Clipboard()->WriteHTML(markup, document_url, text,
133 can_smart_copy_or_delete); 133 can_smart_copy_or_delete);
134 } 134 }
135 135
136 } // namespace blink 136 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/clipboard/DraggedIsolatedFileSystem.cpp ('k') | third_party/WebKit/Source/core/css/RuleSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698