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

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

Issue 590001: Respect the SaveZoneInformation policy when marking downloaded files as unsaf... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 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 | « chrome/browser/download/download_file.cc ('k') | chrome/common/win_safe_util.h » ('j') | 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/save_file.h" 5 #include "chrome/browser/download/save_file.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 bool SaveFile::Open(const char* open_mode) { 93 bool SaveFile::Open(const char* open_mode) {
94 DCHECK(!full_path_.empty()); 94 DCHECK(!full_path_.empty());
95 file_ = file_util::OpenFile(full_path_, open_mode); 95 file_ = file_util::OpenFile(full_path_, open_mode);
96 if (!file_) { 96 if (!file_) {
97 return false; 97 return false;
98 } 98 }
99 #if defined(OS_WIN) 99 #if defined(OS_WIN)
100 // Sets the zone to tell Windows that this file comes from the Internet. 100 // Sets the zone to tell Windows that this file comes from the Internet.
101 // We ignore the return value because a failure is not fatal. 101 // We ignore the return value because a failure is not fatal.
102 // TODO(port): Similarly mark on Mac. 102 // TODO(port): Similarly mark on Mac.
103 win_util::SetInternetZoneIdentifier(full_path_); 103 win_util::SetInternetZoneIdentifier(full_path_,
104 UTF8ToWide(info_->url.spec()));
104 #endif 105 #endif
105 return true; 106 return true;
106 } 107 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_file.cc ('k') | chrome/common/win_safe_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698