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

Side by Side Diff: chrome/browser/platform_util.cc

Issue 209613002: Download shelf autohides on showing in shell, just same as regular open Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added browser and unit tests. Renamed 'UserActed' to 'OpenedOrShown'. Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/platform_util.h" 5 #include "chrome/browser/platform_util.h"
6 6
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/platform_util_internal.h" 10 #include "chrome/browser/platform_util_internal.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void OpenItem(Profile* profile, 55 void OpenItem(Profile* profile,
56 const base::FilePath& full_path, 56 const base::FilePath& full_path,
57 OpenItemType item_type, 57 OpenItemType item_type,
58 const OpenOperationCallback& callback) { 58 const OpenOperationCallback& callback) {
59 DCHECK_CURRENTLY_ON(BrowserThread::UI); 59 DCHECK_CURRENTLY_ON(BrowserThread::UI);
60 BrowserThread::PostBlockingPoolTask( 60 BrowserThread::PostBlockingPoolTask(
61 FROM_HERE, base::Bind(&VerifyAndOpenItemOnBlockingThread, full_path, 61 FROM_HERE, base::Bind(&VerifyAndOpenItemOnBlockingThread, full_path,
62 item_type, callback)); 62 item_type, callback));
63 } 63 }
64 64
65 void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) {
66 DCHECK_CURRENTLY_ON(BrowserThread::UI);
67 if (shell_operations_allowed)
68 internal::PlatformShowItemInFolder(profile, full_path);
69 }
70
65 } // namespace platform_util 71 } // namespace platform_util
OLDNEW
« no previous file with comments | « chrome/browser/ntp_snippets/fake_download_item.cc ('k') | chrome/browser/platform_util_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698