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

Side by Side Diff: content/test/net/url_request_abort_on_end_job.cc

Issue 1544273002: Switch to standard integer types in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This class simulates what wininet does when a dns lookup fails. 4 // This class simulates what wininet does when a dns lookup fails.
5 5
6 #include <algorithm> 6 #include <algorithm>
7 #include <cstring> 7 #include <cstring>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/macros.h"
11 #include "base/numerics/safe_conversions.h" 12 #include "base/numerics/safe_conversions.h"
12 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
13 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
14 #include "base/thread_task_runner_handle.h" 15 #include "base/thread_task_runner_handle.h"
15 #include "content/public/browser/browser_thread.h" 16 #include "content/public/browser/browser_thread.h"
16 #include "content/test/net/url_request_abort_on_end_job.h" 17 #include "content/test/net/url_request_abort_on_end_job.h"
17 #include "net/base/io_buffer.h" 18 #include "net/base/io_buffer.h"
18 #include "net/base/net_errors.h" 19 #include "net/base/net_errors.h"
19 #include "net/http/http_response_headers.h" 20 #include "net/http/http_response_headers.h"
20 #include "net/url_request/url_request.h" 21 #include "net/url_request/url_request.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 std::min(max_bytes, base::checked_cast<int>(sizeof(kPageContent))); 119 std::min(max_bytes, base::checked_cast<int>(sizeof(kPageContent)));
119 std::memcpy(buf->data(), kPageContent, max_bytes); 120 std::memcpy(buf->data(), kPageContent, max_bytes);
120 sent_data_ = true; 121 sent_data_ = true;
121 return max_bytes; 122 return max_bytes;
122 } 123 }
123 124
124 return net::ERR_CONNECTION_ABORTED; 125 return net::ERR_CONNECTION_ABORTED;
125 } 126 }
126 127
127 } // namespace content 128 } // namespace content
OLDNEW
« no previous file with comments | « content/test/net/url_request_abort_on_end_job.h ('k') | content/test/ppapi/ppapi_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698