OLD | NEW |
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 | 4 |
5 #include "content/browser/download/base_file.h" | 5 #include "content/browser/download/base_file.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "base/test/test_file_util.h" | 12 #include "base/test/test_file_util.h" |
13 #include "content/browser/browser_thread_impl.h" | 13 #include "content/browser/browser_thread_impl.h" |
14 #include "content/public/browser/download_interrupt_reasons.h" | 14 #include "content/public/browser/download_interrupt_reasons.h" |
15 #include "crypto/secure_hash.h" | 15 #include "crypto/secure_hash.h" |
16 #include "net/base/file_stream.h" | 16 #include "net/base/file_stream.h" |
17 #include "net/base/mock_file_stream.h" | 17 #include "net/base/mock_file_stream.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 namespace { | 21 namespace { |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 base::FilePath temp_file; | 625 base::FilePath temp_file; |
626 ASSERT_TRUE(file_util::CreateTemporaryFileInDir(temp_dir_.path(), | 626 ASSERT_TRUE(file_util::CreateTemporaryFileInDir(temp_dir_.path(), |
627 &temp_file)); | 627 &temp_file)); |
628 ASSERT_FALSE(temp_file.empty()); | 628 ASSERT_FALSE(temp_file.empty()); |
629 EXPECT_STREQ(temp_file.DirName().value().c_str(), | 629 EXPECT_STREQ(temp_file.DirName().value().c_str(), |
630 base_file_->full_path().DirName().value().c_str()); | 630 base_file_->full_path().DirName().value().c_str()); |
631 base_file_->Finish(); | 631 base_file_->Finish(); |
632 } | 632 } |
633 | 633 |
634 } // namespace content | 634 } // namespace content |
OLD | NEW |