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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc

Issue 14884015: drive: Remove DriveFileType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 #include "chrome/browser/chromeos/extensions/file_manager/file_manager_util.h" 4 #include "chrome/browser/chromeos/extensions/file_manager/file_manager_util.h"
5 5
6 #include "ash/shell.h" 6 #include "ash/shell.h"
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/file_util.h" 9 #include "base/file_util.h"
10 #include "base/json/json_file_value_serializer.h" 10 #include "base/json/json_file_value_serializer.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 installer->set_error_on_unsupported_requirements(true); 258 installer->set_error_on_unsupported_requirements(true);
259 installer->set_is_gallery_install(false); 259 installer->set_is_gallery_install(false);
260 installer->set_allow_silent_install(false); 260 installer->set_allow_silent_install(false);
261 installer->InstallCrx(path); 261 installer->InstallCrx(path);
262 } 262 }
263 263
264 // Called when a crx file on Drive was downloaded. 264 // Called when a crx file on Drive was downloaded.
265 void OnCRXDownloadCallback(Browser* browser, 265 void OnCRXDownloadCallback(Browser* browser,
266 drive::FileError error, 266 drive::FileError error,
267 const base::FilePath& file, 267 const base::FilePath& file,
268 const std::string& unused_mime_type, 268 scoped_ptr<drive::ResourceEntry> entry) {
269 drive::DriveFileType file_type) { 269 if (error != drive::FILE_ERROR_OK)
270 if (error != drive::FILE_ERROR_OK || file_type != drive::REGULAR_FILE)
271 return; 270 return;
272 InstallCRX(browser, file); 271 InstallCRX(browser, file);
273 } 272 }
274 273
275 enum TAB_REUSE_MODE { 274 enum TAB_REUSE_MODE {
276 REUSE_ANY_FILE_MANAGER, 275 REUSE_ANY_FILE_MANAGER,
277 REUSE_SAME_PATH, 276 REUSE_SAME_PATH,
278 REUSE_NEVER 277 REUSE_NEVER
279 }; 278 };
280 279
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 // If a bundled plugin is enabled, we should open pdf/swf files in a tab. 919 // If a bundled plugin is enabled, we should open pdf/swf files in a tab.
921 bool ShouldBeOpenedWithPlugin(Profile* profile, const char* file_extension) { 920 bool ShouldBeOpenedWithPlugin(Profile* profile, const char* file_extension) {
922 if (LowerCaseEqualsASCII(file_extension, kPdfExtension)) 921 if (LowerCaseEqualsASCII(file_extension, kPdfExtension))
923 return IsPdfPluginEnabled(profile); 922 return IsPdfPluginEnabled(profile);
924 if (LowerCaseEqualsASCII(file_extension, kSwfExtension)) 923 if (LowerCaseEqualsASCII(file_extension, kSwfExtension))
925 return IsFlashPluginEnabled(profile); 924 return IsFlashPluginEnabled(profile);
926 return false; 925 return false;
927 } 926 }
928 927
929 } // namespace file_manager_util 928 } // namespace file_manager_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698