| OLD | NEW |
| 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_util.h" | 4 #include "chrome/browser/chromeos/extensions/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_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 arg_value.SetString("title", title); | 334 arg_value.SetString("title", title); |
| 335 arg_value.SetString("defaultPath", default_virtual_path.value()); | 335 arg_value.SetString("defaultPath", default_virtual_path.value()); |
| 336 arg_value.SetString("defaultExtension", default_extension); | 336 arg_value.SetString("defaultExtension", default_extension); |
| 337 | 337 |
| 338 if (file_types) { | 338 if (file_types) { |
| 339 ListValue* types_list = new ListValue(); | 339 ListValue* types_list = new ListValue(); |
| 340 for (size_t i = 0; i < file_types->extensions.size(); ++i) { | 340 for (size_t i = 0; i < file_types->extensions.size(); ++i) { |
| 341 ListValue* extensions_list = new ListValue(); | 341 ListValue* extensions_list = new ListValue(); |
| 342 for (size_t j = 0; j < file_types->extensions[i].size(); ++j) { | 342 for (size_t j = 0; j < file_types->extensions[i].size(); ++j) { |
| 343 extensions_list->Append( | 343 extensions_list->Append( |
| 344 Value::CreateStringValue(file_types->extensions[i][j])); | 344 new base::StringValue(file_types->extensions[i][j])); |
| 345 } | 345 } |
| 346 | 346 |
| 347 DictionaryValue* dict = new DictionaryValue(); | 347 DictionaryValue* dict = new DictionaryValue(); |
| 348 dict->Set("extensions", extensions_list); | 348 dict->Set("extensions", extensions_list); |
| 349 | 349 |
| 350 if (i < file_types->extension_description_overrides.size()) { | 350 if (i < file_types->extension_description_overrides.size()) { |
| 351 string16 desc = file_types->extension_description_overrides[i]; | 351 string16 desc = file_types->extension_description_overrides[i]; |
| 352 dict->SetString("description", desc); | 352 dict->SetString("description", desc); |
| 353 } | 353 } |
| 354 | 354 |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 for (google_apis::OperationProgressStatusList::const_iterator iter = | 853 for (google_apis::OperationProgressStatusList::const_iterator iter = |
| 854 list.begin(); | 854 list.begin(); |
| 855 iter != list.end(); ++iter) { | 855 iter != list.end(); ++iter) { |
| 856 result_list->Append( | 856 result_list->Append( |
| 857 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); | 857 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); |
| 858 } | 858 } |
| 859 return result_list.release(); | 859 return result_list.release(); |
| 860 } | 860 } |
| 861 | 861 |
| 862 } // namespace file_manager_util | 862 } // namespace file_manager_util |
| OLD | NEW |