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

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

Issue 10964007: Re-commit: Add new PathService paths for Windows' All Users Desktop and Quick Launch folders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Windows only includes/pragma in the ifdef OS_WIN Created 8 years, 3 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
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « base/path_service_unittest.cc ('k') | chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698