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

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

Issue 10824067: Some fixes to run unit_tests bundle on android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « build/android/pylib/test_package.py ('k') | chrome/browser/prefs/browser_prefs.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Download utility implementation 5 // Download utility implementation
6 6
7 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. 7 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first.
8 8
9 #include "chrome/browser/download/download_util.h" 9 #include "chrome/browser/download/download_util.h"
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 bool DownloadPathIsDangerous(const FilePath& download_path) { 161 bool DownloadPathIsDangerous(const FilePath& download_path) {
162 #if defined(OS_LINUX) 162 #if defined(OS_LINUX)
163 FilePath home_dir = file_util::GetHomeDir(); 163 FilePath home_dir = file_util::GetHomeDir();
164 if (download_path == home_dir) { 164 if (download_path == home_dir) {
165 return true; 165 return true;
166 } 166 }
167 #endif 167 #endif
168 168
169 FilePath desktop_dir; 169 FilePath desktop_dir;
170 if (!PathService::Get(chrome::DIR_USER_DESKTOP, &desktop_dir)) { 170 if (!PathService::Get(chrome::DIR_USER_DESKTOP, &desktop_dir)) {
171 NOTREACHED();
asanka 2012/07/27 19:19:46 If this check doesn't apply to OS_ANDROID, I'd rat
nilesh 2012/07/27 20:09:25 Done.
172 return false; 171 return false;
173 } 172 }
174 return (download_path == desktop_dir); 173 return (download_path == desktop_dir);
175 } 174 }
176 175
177 // Download progress painting -------------------------------------------------- 176 // Download progress painting --------------------------------------------------
178 177
179 // Common images used for download progress animations. We load them once the 178 // Common images used for download progress animations. We load them once the
180 // first time we do a progress paint, then reuse them as they are always the 179 // first time we do a progress paint, then reuse them as they are always the
181 // same. 180 // same.
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 UMA_HISTOGRAM_ENUMERATION( 633 UMA_HISTOGRAM_ENUMERATION(
635 "Download.CountsChrome", type, CHROME_DOWNLOAD_COUNT_TYPES_LAST_ENTRY); 634 "Download.CountsChrome", type, CHROME_DOWNLOAD_COUNT_TYPES_LAST_ENTRY);
636 } 635 }
637 636
638 void RecordDownloadSource(ChromeDownloadSource source) { 637 void RecordDownloadSource(ChromeDownloadSource source) {
639 UMA_HISTOGRAM_ENUMERATION( 638 UMA_HISTOGRAM_ENUMERATION(
640 "Download.SourcesChrome", source, CHROME_DOWNLOAD_SOURCE_LAST_ENTRY); 639 "Download.SourcesChrome", source, CHROME_DOWNLOAD_SOURCE_LAST_ENTRY);
641 } 640 }
642 641
643 } // namespace download_util 642 } // namespace download_util
OLDNEW
« no previous file with comments | « build/android/pylib/test_package.py ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698