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

Side by Side Diff: chrome/browser/download/download_file.cc

Issue 28157: OS_MAC should be OS_MACOSX. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | « no previous file | 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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/download/download_file.h" 5 #include "chrome/browser/download/download_file.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 DCHECK(!full_path_.empty()); 130 DCHECK(!full_path_.empty());
131 file_ = file_util::OpenFile(full_path_, open_mode); 131 file_ = file_util::OpenFile(full_path_, open_mode);
132 if (!file_) { 132 if (!file_) {
133 return false; 133 return false;
134 } 134 }
135 135
136 #if defined(OS_WIN) 136 #if defined(OS_WIN)
137 // Sets the Zone to tell Windows that this file comes from the internet. 137 // Sets the Zone to tell Windows that this file comes from the internet.
138 // We ignore the return value because a failure is not fatal. 138 // We ignore the return value because a failure is not fatal.
139 win_util::SetInternetZoneIdentifier(full_path_); 139 win_util::SetInternetZoneIdentifier(full_path_);
140 #elif defined(OS_MAC) 140 #elif defined(OS_MACOSX)
141 // TODO(port) there should be an equivalent on Mac (there isn't on Linux). 141 // TODO(port) there should be an equivalent on Mac (there isn't on Linux).
142 NOTREACHED(); 142 NOTREACHED();
143 #endif 143 #endif
144 return true; 144 return true;
145 } 145 }
146 146
147 // DownloadFileManager implementation ------------------------------------------ 147 // DownloadFileManager implementation ------------------------------------------
148 148
149 DownloadFileManager::DownloadFileManager(MessageLoop* ui_loop, 149 DownloadFileManager::DownloadFileManager(MessageLoop* ui_loop,
150 ResourceDispatcherHost* rdh) 150 ResourceDispatcherHost* rdh)
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 ui_loop_->PostTask(FROM_HERE, NewRunnableMethod( 595 ui_loop_->PostTask(FROM_HERE, NewRunnableMethod(
596 this, &DownloadFileManager::StopUpdateTimer)); 596 this, &DownloadFileManager::StopUpdateTimer));
597 } 597 }
598 598
599 // static 599 // static
600 void DownloadFileManager::DeleteFile(const FilePath& path) { 600 void DownloadFileManager::DeleteFile(const FilePath& path) {
601 // Make sure we only delete files. 601 // Make sure we only delete files.
602 if (!file_util::DirectoryExists(path)) 602 if (!file_util::DirectoryExists(path))
603 file_util::Delete(path, false); 603 file_util::Delete(path, false);
604 } 604 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698