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

Side by Side Diff: chrome/browser/platform_util_linux.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
« no previous file with comments | « chrome/browser/platform_util_internal.h ('k') | chrome/browser/platform_util_mac.mm » ('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 #include "chrome/browser/platform_util.h" 5 #include "chrome/browser/platform_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/process/kill.h" 10 #include "base/process/kill.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // between the time the utility process changes into the directory and the 148 // between the time the utility process changes into the directory and the
149 // time the application invoked by xdg-open inspects the path by name. 149 // time the application invoked by xdg-open inspects the path by name.
150 XDGOpen(path, "."); 150 XDGOpen(path, ".");
151 break; 151 break;
152 case SHOW_ITEM_IN_FOLDER: 152 case SHOW_ITEM_IN_FOLDER:
153 ShowFileInNautilus(path.DirName(), path.value()); 153 ShowFileInNautilus(path.DirName(), path.value());
154 break; 154 break;
155 } 155 }
156 } 156 }
157 157
158 } // namespace internal 158 void PlatformShowItemInFolder(Profile* profile,
159 159 const base::FilePath& full_path) {
160 void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) {
161 DCHECK_CURRENTLY_ON(BrowserThread::UI); 160 DCHECK_CURRENTLY_ON(BrowserThread::UI);
162 base::PostTaskAndReplyWithResult(content::BrowserThread::GetBlockingPool(), 161 base::PostTaskAndReplyWithResult(content::BrowserThread::GetBlockingPool(),
163 FROM_HERE, 162 FROM_HERE,
164 base::Bind(&CheckNautilusIsDefault), 163 base::Bind(&CheckNautilusIsDefault),
165 base::Bind(&ShowItem, profile, full_path)); 164 base::Bind(&ShowItem, profile, full_path));
166 } 165 }
167 166
167 } // namespace internal
168
168 void OpenExternal(Profile* profile, const GURL& url) { 169 void OpenExternal(Profile* profile, const GURL& url) {
169 DCHECK_CURRENTLY_ON(BrowserThread::UI); 170 DCHECK_CURRENTLY_ON(BrowserThread::UI);
170 if (url.SchemeIs("mailto")) 171 if (url.SchemeIs("mailto"))
171 XDGEmail(url.spec()); 172 XDGEmail(url.spec());
172 else 173 else
173 XDGOpen(base::FilePath(), url.spec()); 174 XDGOpen(base::FilePath(), url.spec());
174 } 175 }
175 176
176 } // namespace platform_util 177 } // namespace platform_util
OLDNEW
« no previous file with comments | « chrome/browser/platform_util_internal.h ('k') | chrome/browser/platform_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698