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

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

Issue 29263007: linux and chromeos: Turn on -Wunused-const-variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years, 2 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
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/file_tasks.h" 5 #include "chrome/browser/chromeos/file_manager/file_tasks.h"
6 6
7 #include "apps/launcher.h" 7 #include "apps/launcher.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // TODO(satorux): We should rename them to "file_browser_handler" and 44 // TODO(satorux): We should rename them to "file_browser_handler" and
45 // "file_handler" respectively when switching from preferences to 45 // "file_handler" respectively when switching from preferences to
46 // chrome.storage crbug.com/267359 46 // chrome.storage crbug.com/267359
47 const char kFileBrowserHandlerTaskType[] = "file"; 47 const char kFileBrowserHandlerTaskType[] = "file";
48 const char kFileHandlerTaskType[] = "app"; 48 const char kFileHandlerTaskType[] = "app";
49 const char kDriveAppTaskType[] = "drive"; 49 const char kDriveAppTaskType[] = "drive";
50 50
51 // Drive apps always use the action ID. 51 // Drive apps always use the action ID.
52 const char kDriveAppActionID[] = "open-with"; 52 const char kDriveAppActionID[] = "open-with";
53 53
54 // Default icon path for drive docs.
55 const char kDefaultIcon[] = "images/filetype_generic.png";
56
57 // Converts a TaskType to a string. 54 // Converts a TaskType to a string.
58 std::string TaskTypeToString(TaskType task_type) { 55 std::string TaskTypeToString(TaskType task_type) {
59 switch (task_type) { 56 switch (task_type) {
60 case TASK_TYPE_FILE_BROWSER_HANDLER: 57 case TASK_TYPE_FILE_BROWSER_HANDLER:
61 return kFileBrowserHandlerTaskType; 58 return kFileBrowserHandlerTaskType;
62 case TASK_TYPE_FILE_HANDLER: 59 case TASK_TYPE_FILE_HANDLER:
63 return kFileHandlerTaskType; 60 return kFileHandlerTaskType;
64 case TASK_TYPE_DRIVE_APP: 61 case TASK_TYPE_DRIVE_APP:
65 return kDriveAppTaskType; 62 return kDriveAppTaskType;
66 case TASK_TYPE_UNKNOWN: 63 case TASK_TYPE_UNKNOWN:
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 if (file_browser_handlers::IsFallbackFileBrowserHandler( 528 if (file_browser_handlers::IsFallbackFileBrowserHandler(
532 task->task_descriptor())) { 529 task->task_descriptor())) {
533 task->set_is_default(true); 530 task->set_is_default(true);
534 return; 531 return;
535 } 532 }
536 } 533 }
537 } 534 }
538 535
539 } // namespace file_tasks 536 } // namespace file_tasks
540 } // namespace file_manager 537 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698