| OLD | NEW |
| 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 "storage/browser/fileapi/file_system_dir_url_request_job.h" | 5 #include "storage/browser/fileapi/file_system_dir_url_request_job.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 icu::UnicodeString date_ustr(match.group(5, status)); | 274 icu::UnicodeString date_ustr(match.group(5, status)); |
| 275 scoped_ptr<icu::DateFormat> formatter( | 275 scoped_ptr<icu::DateFormat> formatter( |
| 276 icu::DateFormat::createDateTimeInstance(icu::DateFormat::kShort)); | 276 icu::DateFormat::createDateTimeInstance(icu::DateFormat::kShort)); |
| 277 UErrorCode parse_status = U_ZERO_ERROR; | 277 UErrorCode parse_status = U_ZERO_ERROR; |
| 278 UDate udate = formatter->parse(date_ustr, parse_status); | 278 UDate udate = formatter->parse(date_ustr, parse_status); |
| 279 EXPECT_TRUE(U_SUCCESS(parse_status)); | 279 EXPECT_TRUE(U_SUCCESS(parse_status)); |
| 280 base::Time date = base::Time::FromJsTime(udate); | 280 base::Time date = base::Time::FromJsTime(udate); |
| 281 EXPECT_FALSE(date.is_null()); | 281 EXPECT_FALSE(date.is_null()); |
| 282 } | 282 } |
| 283 | 283 |
| 284 GURL CreateFileSystemURL(const std::string path) { | 284 GURL CreateFileSystemURL(const std::string& path) { |
| 285 return GURL(kFileSystemURLPrefix + path); | 285 return GURL(kFileSystemURLPrefix + path); |
| 286 } | 286 } |
| 287 | 287 |
| 288 storage::FileSystemFileUtil* file_util() { | 288 storage::FileSystemFileUtil* file_util() { |
| 289 return file_system_context_->sandbox_delegate()->sync_file_util(); | 289 return file_system_context_->sandbox_delegate()->sync_file_util(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 // Put the message loop at the top, so that it's the last thing deleted. | 292 // Put the message loop at the top, so that it's the last thing deleted. |
| 293 // Delete all task runner objects before the MessageLoop, to help prevent | 293 // Delete all task runner objects before the MessageLoop, to help prevent |
| 294 // leaks caused by tasks posted during shutdown. | 294 // leaks caused by tasks posted during shutdown. |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 ASSERT_FALSE(request_->status().is_success()); | 450 ASSERT_FALSE(request_->status().is_success()); |
| 451 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error()); | 451 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error()); |
| 452 | 452 |
| 453 ASSERT_FALSE( | 453 ASSERT_FALSE( |
| 454 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( | 454 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( |
| 455 kValidExternalMountPoint)); | 455 kValidExternalMountPoint)); |
| 456 } | 456 } |
| 457 | 457 |
| 458 } // namespace | 458 } // namespace |
| 459 } // namespace content | 459 } // namespace content |
| OLD | NEW |