OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/webui/chromeos/provided_file_systems_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/provided_file_systems_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 service->GetProvidedFileSystem(file_system_info.extension_id(), | 282 service->GetProvidedFileSystem(file_system_info.extension_id(), |
283 file_system_info.file_system_id()); | 283 file_system_info.file_system_id()); |
284 DCHECK(file_system); | 284 DCHECK(file_system); |
285 | 285 |
286 file_system_provider::RequestManager* const request_manager = | 286 file_system_provider::RequestManager* const request_manager = |
287 file_system->GetRequestManager(); | 287 file_system->GetRequestManager(); |
288 DCHECK(request_manager); | 288 DCHECK(request_manager); |
289 | 289 |
290 base::DictionaryValue* item = new base::DictionaryValue(); | 290 base::DictionaryValue* item = new base::DictionaryValue(); |
291 item->SetString(kKeyId, file_system_info.file_system_id()); | 291 item->SetString(kKeyId, file_system_info.file_system_id()); |
292 item->SetString(kKeyName, file_system_info.file_system_name()); | 292 item->SetString(kKeyName, file_system_info.display_name()); |
293 item->SetString(kKeyExtensionId, file_system_info.extension_id()); | 293 item->SetString(kKeyExtensionId, file_system_info.extension_id()); |
294 item->SetString(kKeyMountPath, | 294 item->SetString(kKeyMountPath, |
295 file_system_info.mount_path().AsUTF8Unsafe()); | 295 file_system_info.mount_path().AsUTF8Unsafe()); |
296 item->SetInteger(kKeyActiveRequests, | 296 item->SetInteger(kKeyActiveRequests, |
297 request_manager->GetActiveRequestsForLogging()); | 297 request_manager->GetActiveRequestsForLogging()); |
298 | 298 |
299 items.Append(item); | 299 items.Append(item); |
300 } | 300 } |
301 | 301 |
302 web_ui()->CallJavascriptFunction(kFunctionUpdateFileSystems, items); | 302 web_ui()->CallJavascriptFunction(kFunctionUpdateFileSystems, items); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 IDR_PROVIDED_FILE_SYSTEMS_CSS); | 358 IDR_PROVIDED_FILE_SYSTEMS_CSS); |
359 source->AddResourcePath("provided_file_systems.js", | 359 source->AddResourcePath("provided_file_systems.js", |
360 IDR_PROVIDED_FILE_SYSTEMS_JS); | 360 IDR_PROVIDED_FILE_SYSTEMS_JS); |
361 source->SetDefaultResource(IDR_PROVIDED_FILE_SYSTEMS_HTML); | 361 source->SetDefaultResource(IDR_PROVIDED_FILE_SYSTEMS_HTML); |
362 | 362 |
363 Profile* profile = Profile::FromWebUI(web_ui); | 363 Profile* profile = Profile::FromWebUI(web_ui); |
364 content::WebUIDataSource::Add(profile, source); | 364 content::WebUIDataSource::Add(profile, source); |
365 } | 365 } |
366 | 366 |
367 } // namespace chromeos | 367 } // namespace chromeos |
OLD | NEW |