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

Side by Side Diff: chrome/browser/chromeos/file_manager/open_util.cc

Issue 561133004: Update the error message in the Files app via Downloads panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | no next file » | 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/chromeos/file_manager/open_util.h" 5 #include "chrome/browser/chromeos/file_manager/open_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 profile, 135 profile,
136 path, 136 path,
137 base::Bind(&OpenFileWithMimeType, profile, path, url, callback)); 137 base::Bind(&OpenFileWithMimeType, profile, path, url, callback));
138 } 138 }
139 139
140 // Called when execution of ContinueOpenItem() is completed. 140 // Called when execution of ContinueOpenItem() is completed.
141 void OnContinueOpenItemCompleted(Profile* profile, 141 void OnContinueOpenItemCompleted(Profile* profile,
142 const base::FilePath& file_path, 142 const base::FilePath& file_path,
143 bool result) { 143 bool result) {
144 if (!result) { 144 if (!result) {
145 ShowWarningMessageBox( 145 int message;
146 profile, file_path, IDS_FILE_BROWSER_ERROR_VIEWING_FILE); 146 if (file_path.Extension() == FILE_PATH_LITERAL(".dmg"))
147 message = IDS_FILE_BROWSER_ERROR_VIEWING_FILE_FOR_DMG;
148 else if (file_path.Extension() == FILE_PATH_LITERAL(".exe") ||
149 file_path.Extension() == FILE_PATH_LITERAL(".msi"))
150 message = IDS_FILE_BROWSER_ERROR_VIEWING_FILE_FOR_EXECUTABLE;
151 else
152 message = IDS_FILE_BROWSER_ERROR_VIEWING_FILE;
153 ShowWarningMessageBox(profile, file_path, message);
147 } 154 }
148 } 155 }
149 156
150 // Used to implement OpenItem(). 157 // Used to implement OpenItem().
151 void ContinueOpenItem(Profile* profile, 158 void ContinueOpenItem(Profile* profile,
152 const base::FilePath& file_path, 159 const base::FilePath& file_path,
153 const GURL& url, 160 const GURL& url,
154 base::File::Error error) { 161 base::File::Error error) {
155 DCHECK_CURRENTLY_ON(BrowserThread::UI); 162 DCHECK_CURRENTLY_ON(BrowserThread::UI);
156 163
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 GURL url; 231 GURL url;
225 if (!ConvertPath(profile, file_path, &converted_path, &url)) 232 if (!ConvertPath(profile, file_path, &converted_path, &url))
226 return; 233 return;
227 234
228 // This action changes the selection so we do not reuse existing tabs. 235 // This action changes the selection so we do not reuse existing tabs.
229 OpenFileManagerWithInternalActionId(profile, url, "select"); 236 OpenFileManagerWithInternalActionId(profile, url, "select");
230 } 237 }
231 238
232 } // namespace util 239 } // namespace util
233 } // namespace file_manager 240 } // namespace file_manager
OLDNEW
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698