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

Side by Side Diff: content/browser/download/base_file.h

Issue 7646025: Detect file system errors during downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comment. Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_
6 #define CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual std::string DebugString() const; 65 virtual std::string DebugString() const;
66 66
67 protected: 67 protected:
68 bool Open(); 68 bool Open();
69 void Close(); 69 void Close();
70 70
71 // Full path to the file including the file name. 71 // Full path to the file including the file name.
72 FilePath full_path_; 72 FilePath full_path_;
73 73
74 private: 74 private:
75 friend class BaseFileTest;
76
75 static const size_t kSha256HashLen = 32; 77 static const size_t kSha256HashLen = 32;
76 78
77 // Source URL for the file being downloaded. 79 // Source URL for the file being downloaded.
78 GURL source_url_; 80 GURL source_url_;
79 81
80 // The URL where the download was initiated. 82 // The URL where the download was initiated.
81 GURL referrer_url_; 83 GURL referrer_url_;
82 84
83 // OS file stream for writing 85 // OS file stream for writing
84 linked_ptr<net::FileStream> file_stream_; 86 linked_ptr<net::FileStream> file_stream_;
(...skipping 14 matching lines...) Expand all
99 unsigned char sha256_hash_[kSha256HashLen]; 101 unsigned char sha256_hash_[kSha256HashLen];
100 102
101 // Indicates that this class no longer owns the associated file, and so 103 // Indicates that this class no longer owns the associated file, and so
102 // won't delete it on destruction. 104 // won't delete it on destruction.
103 bool detached_; 105 bool detached_;
104 106
105 DISALLOW_COPY_AND_ASSIGN(BaseFile); 107 DISALLOW_COPY_AND_ASSIGN(BaseFile);
106 }; 108 };
107 109
108 #endif // CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ 110 #endif // CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698