OLD | NEW |
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 if (download_path == home_dir) { | 131 if (download_path == home_dir) { |
132 return true; | 132 return true; |
133 } | 133 } |
134 #endif | 134 #endif |
135 | 135 |
136 #if defined(OS_ANDROID) | 136 #if defined(OS_ANDROID) |
137 // Android does not have a desktop dir. | 137 // Android does not have a desktop dir. |
138 return false; | 138 return false; |
139 #else | 139 #else |
140 FilePath desktop_dir; | 140 FilePath desktop_dir; |
141 if (!PathService::Get(chrome::DIR_USER_DESKTOP, &desktop_dir)) { | 141 if (!PathService::Get(base::DIR_USER_DESKTOP, &desktop_dir)) { |
142 NOTREACHED(); | 142 NOTREACHED(); |
143 return false; | 143 return false; |
144 } | 144 } |
145 return (download_path == desktop_dir); | 145 return (download_path == desktop_dir); |
146 #endif | 146 #endif |
147 } | 147 } |
148 | 148 |
149 // Download progress painting -------------------------------------------------- | 149 // Download progress painting -------------------------------------------------- |
150 | 150 |
151 // Common images used for download progress animations. We load them once the | 151 // Common images used for download progress animations. We load them once the |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 UMA_HISTOGRAM_ENUMERATION( | 478 UMA_HISTOGRAM_ENUMERATION( |
479 "Download.CountsChrome", type, CHROME_DOWNLOAD_COUNT_TYPES_LAST_ENTRY); | 479 "Download.CountsChrome", type, CHROME_DOWNLOAD_COUNT_TYPES_LAST_ENTRY); |
480 } | 480 } |
481 | 481 |
482 void RecordDownloadSource(ChromeDownloadSource source) { | 482 void RecordDownloadSource(ChromeDownloadSource source) { |
483 UMA_HISTOGRAM_ENUMERATION( | 483 UMA_HISTOGRAM_ENUMERATION( |
484 "Download.SourcesChrome", source, CHROME_DOWNLOAD_SOURCE_LAST_ENTRY); | 484 "Download.SourcesChrome", source, CHROME_DOWNLOAD_SOURCE_LAST_ENTRY); |
485 } | 485 } |
486 | 486 |
487 } // namespace download_util | 487 } // namespace download_util |
OLD | NEW |