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

Side by Side Diff: content/test/mock_webclipboard_impl.cc

Issue 202863004: Fix "unreachable code" warnings (MSVC warning 4702) in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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
« no previous file with comments | « content/shell/renderer/test_runner/TestPlugin.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/test/mock_webclipboard_impl.h" 5 #include "content/test/mock_webclipboard_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 27 matching lines...) Expand all
38 case FormatHTML: 38 case FormatHTML:
39 return !m_htmlText.is_null(); 39 return !m_htmlText.is_null();
40 40
41 case FormatSmartPaste: 41 case FormatSmartPaste:
42 return m_writeSmartPaste; 42 return m_writeSmartPaste;
43 43
44 default: 44 default:
45 NOTREACHED(); 45 NOTREACHED();
46 return false; 46 return false;
47 } 47 }
48
49 switch (buffer) {
50 case BufferStandard:
51 break;
52 case BufferSelection:
53 #if defined(OS_POSIX) && !defined(OS_MACOSX)
54 break;
55 #endif
56 default:
57 NOTREACHED();
58 return false;
59 }
60
61 return true;
62 } 48 }
63 49
64 WebVector<WebString> MockWebClipboardImpl::readAvailableTypes( 50 WebVector<WebString> MockWebClipboardImpl::readAvailableTypes(
65 Buffer buffer, 51 Buffer buffer,
66 bool* containsFilenames) { 52 bool* containsFilenames) {
67 *containsFilenames = false; 53 *containsFilenames = false;
68 std::vector<WebString> results; 54 std::vector<WebString> results;
69 if (!m_plainText.string().empty()) { 55 if (!m_plainText.string().empty()) {
70 results.push_back(WebString("text/plain")); 56 results.push_back(WebString("text/plain"));
71 } 57 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 186
201 void MockWebClipboardImpl::clear() { 187 void MockWebClipboardImpl::clear() {
202 m_plainText = base::NullableString16(); 188 m_plainText = base::NullableString16();
203 m_htmlText = base::NullableString16(); 189 m_htmlText = base::NullableString16();
204 m_image.reset(); 190 m_image.reset();
205 m_customData.clear(); 191 m_customData.clear();
206 m_writeSmartPaste = false; 192 m_writeSmartPaste = false;
207 } 193 }
208 194
209 } // namespace content 195 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/TestPlugin.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698