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

Side by Side Diff: Source/core/platform/chromium/ClipboardUtilitiesChromium.cpp

Issue 23672027: Rename OS(WINDOWS) to OS(WIN) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 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 28 matching lines...) Expand all
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 WebKit::WebClipboard::Buffer currentPasteboardBuffer() 42 WebKit::WebClipboard::Buffer currentPasteboardBuffer()
43 { 43 {
44 return Pasteboard::generalPasteboard()->isSelectionMode() ? 44 return Pasteboard::generalPasteboard()->isSelectionMode() ?
45 WebKit::WebClipboard::BufferSelection : 45 WebKit::WebClipboard::BufferSelection :
46 WebKit::WebClipboard::BufferStandard; 46 WebKit::WebClipboard::BufferStandard;
47 } 47 }
48 48
49 #if OS(WINDOWS) 49 #if OS(WIN)
50 void replaceNewlinesWithWindowsStyleNewlines(String& str) 50 void replaceNewlinesWithWindowsStyleNewlines(String& str)
51 { 51 {
52 DEFINE_STATIC_LOCAL(String, windowsNewline, ("\r\n")); 52 DEFINE_STATIC_LOCAL(String, windowsNewline, ("\r\n"));
53 StringBuilder result; 53 StringBuilder result;
54 for (unsigned index = 0; index < str.length(); ++index) { 54 for (unsigned index = 0; index < str.length(); ++index) {
55 if (str[index] != '\n' || (index > 0 && str[index - 1] == '\r')) 55 if (str[index] != '\n' || (index > 0 && str[index - 1] == '\r'))
56 result.append(str[index]); 56 result.append(str[index]);
57 else 57 else
58 result.append(windowsNewline); 58 result.append(windowsNewline);
59 } 59 }
(...skipping 24 matching lines...) Expand all
84 if (line[0] == '#') 84 if (line[0] == '#')
85 continue; 85 continue;
86 KURL url = KURL(ParsedURLString, line); 86 KURL url = KURL(ParsedURLString, line);
87 if (url.isValid()) 87 if (url.isValid())
88 return url; 88 return url;
89 } 89 }
90 return String(); 90 return String();
91 } 91 }
92 92
93 } // namespace WebCore 93 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/platform/chromium/ClipboardUtilitiesChromium.h ('k') | Source/core/platform/chromium/KeyboardCodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698