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

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

Issue 351029: Support dragging a virtual file out of the browser. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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/dom_ui/downloads_dom_handler.h ('k') | chrome/browser/download/download_file.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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 7
8 #include "chrome/browser/download/download_util.h" 8 #include "chrome/browser/download/download_util.h"
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/string_util.h"
11 12
12 namespace download_util { 13 namespace download_util {
13 14
14 // For file extensions taken from mozilla: 15 // For file extensions taken from mozilla:
15 16
16 /* ***** BEGIN LICENSE BLOCK ***** 17 /* ***** BEGIN LICENSE BLOCK *****
17 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 18 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
18 * 19 *
19 * The contents of this file are subject to the Mozilla Public License Version 20 * The contents of this file are subject to the Mozilla Public License Version
20 * 1.1 (the "License"); you may not use this file except in compliance with 21 * 1.1 (the "License"); you may not use this file except in compliance with
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 "pl", 152 "pl",
152 "py", 153 "py",
153 "rb", 154 "rb",
154 "sh", 155 "sh",
155 #elif defined(OS_MACOSX) 156 #elif defined(OS_MACOSX)
156 // TODO(thakis): Figure out what makes sense here -- crbug.com/19096 157 // TODO(thakis): Figure out what makes sense here -- crbug.com/19096
157 "dmg", 158 "dmg",
158 #endif 159 #endif
159 }; 160 };
160 161
161 void InitializeExeTypes(std::set<std::string>* exe_extensions) { 162 bool IsExecutableExtension(const std::string& extension) {
162 DCHECK(exe_extensions); 163 for (size_t i = 0; i < arraysize(g_executables); ++i) {
163 for (size_t i = 0; i < arraysize(g_executables); ++i) 164 if (LowerCaseEqualsASCII(extension, g_executables[i]))
164 exe_extensions->insert(g_executables[i]); 165 return true;
166 }
167 return false;
165 } 168 }
166 169
167 } // namespace download_util 170 } // namespace download_util
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/downloads_dom_handler.h ('k') | chrome/browser/download/download_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698