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

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api.cc

Issue 352393002: Be explicit about target type in platform_util::OpenItem() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Catch up with changes to JSONStringValueSerializer and address CrOS comment Created 5 years, 9 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 #include "chrome/browser/extensions/api/downloads/downloads_api.h" 5 #include "chrome/browser/extensions/api/downloads/downloads_api.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 1324
1325 DownloadsShowDefaultFolderFunction::DownloadsShowDefaultFolderFunction() {} 1325 DownloadsShowDefaultFolderFunction::DownloadsShowDefaultFolderFunction() {}
1326 1326
1327 DownloadsShowDefaultFolderFunction::~DownloadsShowDefaultFolderFunction() {} 1327 DownloadsShowDefaultFolderFunction::~DownloadsShowDefaultFolderFunction() {}
1328 1328
1329 bool DownloadsShowDefaultFolderFunction::RunAsync() { 1329 bool DownloadsShowDefaultFolderFunction::RunAsync() {
1330 DownloadManager* manager = NULL; 1330 DownloadManager* manager = NULL;
1331 DownloadManager* incognito_manager = NULL; 1331 DownloadManager* incognito_manager = NULL;
1332 GetManagers(GetProfile(), include_incognito(), &manager, &incognito_manager); 1332 GetManagers(GetProfile(), include_incognito(), &manager, &incognito_manager);
1333 platform_util::OpenItem( 1333 platform_util::OpenItem(
1334 GetProfile(), 1334 GetProfile(), DownloadPrefs::FromDownloadManager(manager)->DownloadPath(),
1335 DownloadPrefs::FromDownloadManager(manager)->DownloadPath()); 1335 platform_util::OPEN_FOLDER, platform_util::OpenOperationCallback());
1336 RecordApiFunctions(DOWNLOADS_FUNCTION_SHOW_DEFAULT_FOLDER); 1336 RecordApiFunctions(DOWNLOADS_FUNCTION_SHOW_DEFAULT_FOLDER);
1337 return true; 1337 return true;
1338 } 1338 }
1339 1339
1340 DownloadsOpenFunction::DownloadsOpenFunction() {} 1340 DownloadsOpenFunction::DownloadsOpenFunction() {}
1341 1341
1342 DownloadsOpenFunction::~DownloadsOpenFunction() {} 1342 DownloadsOpenFunction::~DownloadsOpenFunction() {}
1343 1343
1344 bool DownloadsOpenFunction::RunSync() { 1344 bool DownloadsOpenFunction::RunSync() {
1345 scoped_ptr<downloads::Open::Params> params( 1345 scoped_ptr<downloads::Open::Params> params(
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1900 return; 1900 return;
1901 base::Time now(base::Time::Now()); 1901 base::Time now(base::Time::Now());
1902 int delta = now.ToTimeT() - last_checked_removal_.ToTimeT(); 1902 int delta = now.ToTimeT() - last_checked_removal_.ToTimeT();
1903 if (delta <= kFileExistenceRateLimitSeconds) 1903 if (delta <= kFileExistenceRateLimitSeconds)
1904 return; 1904 return;
1905 last_checked_removal_ = now; 1905 last_checked_removal_ = now;
1906 manager->CheckForHistoryFilesRemoval(); 1906 manager->CheckForHistoryFilesRemoval();
1907 } 1907 }
1908 1908
1909 } // namespace extensions 1909 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698