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

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

Issue 23658009: Replace mountType by volumeType on fileBrowserPrivate APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/file_manager/private_api_util.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "chrome/browser/chromeos/drive/drive.pb.h" 8 #include "chrome/browser/chromeos/drive/drive.pb.h"
9 #include "chrome/browser/chromeos/drive/drive_integration_service.h" 9 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
10 #include "chrome/browser/chromeos/drive/file_errors.h" 10 #include "chrome/browser/chromeos/drive/file_errors.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } else { 111 } else {
112 DLOG(ERROR) << "Failed to get " << file_path.value() 112 DLOG(ERROR) << "Failed to get " << file_path.value()
113 << " with error code: " << error; 113 << " with error code: " << error;
114 } 114 }
115 params->selected_files.push_back(ui::SelectedFileInfo(file_path, local_path)); 115 params->selected_files.push_back(ui::SelectedFileInfo(file_path, local_path));
116 GetSelectedFileInfoInternal(profile, params.Pass()); 116 GetSelectedFileInfoInternal(profile, params.Pass());
117 } 117 }
118 118
119 } // namespace 119 } // namespace
120 120
121 // Returns string representaion of VolumeType.
122 std::string VolumeTypeToStringEnum(VolumeType type) {
123 switch (type) {
124 case VOLUME_TYPE_GOOGLE_DRIVE:
125 return "drive";
126 case VOLUME_TYPE_DOWNLOADS_DIRECTORY:
127 return "downloads";
128 case VOLUME_TYPE_REMOVABLE_DISK_PARTITION:
129 return "removable";
130 case VOLUME_TYPE_MOUNTED_ARCHIVE_FILE:
131 return "archive";
132 }
133
134 NOTREACHED();
135 return "";
136 }
137
121 int32 GetTabId(ExtensionFunctionDispatcher* dispatcher) { 138 int32 GetTabId(ExtensionFunctionDispatcher* dispatcher) {
122 if (!dispatcher) { 139 if (!dispatcher) {
123 LOG(WARNING) << "No dispatcher"; 140 LOG(WARNING) << "No dispatcher";
124 return 0; 141 return 0;
125 } 142 }
126 if (!dispatcher->delegate()) { 143 if (!dispatcher->delegate()) {
127 LOG(WARNING) << "No delegate"; 144 LOG(WARNING) << "No delegate";
128 return 0; 145 return 0;
129 } 146 }
130 content::WebContents* web_contents = 147 content::WebContents* web_contents =
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 196
180 BrowserThread::PostTask( 197 BrowserThread::PostTask(
181 BrowserThread::UI, FROM_HERE, 198 BrowserThread::UI, FROM_HERE,
182 base::Bind(&GetSelectedFileInfoInternal, 199 base::Bind(&GetSelectedFileInfoInternal,
183 profile, 200 profile,
184 base::Passed(&params))); 201 base::Passed(&params)));
185 } 202 }
186 203
187 } // namespace util 204 } // namespace util
188 } // namespace file_manager 205 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698