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 | 4 |
5 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h" | 5 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" | 21 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" |
22 #include "chrome/browser/chromeos/extensions/file_handler_util.h" | 22 #include "chrome/browser/chromeos/extensions/file_handler_util.h" |
23 #include "chrome/browser/chromeos/extensions/file_manager_util.h" | 23 #include "chrome/browser/chromeos/extensions/file_manager_util.h" |
24 #include "chrome/browser/chromeos/gdata/drive_webapps_registry.h" | 24 #include "chrome/browser/chromeos/gdata/drive_webapps_registry.h" |
25 #include "chrome/browser/chromeos/gdata/gdata.pb.h" | 25 #include "chrome/browser/chromeos/gdata/gdata.pb.h" |
26 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" | 26 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" |
27 #include "chrome/browser/chromeos/gdata/gdata_operation_registry.h" | 27 #include "chrome/browser/chromeos/gdata/gdata_operation_registry.h" |
28 #include "chrome/browser/chromeos/gdata/gdata_system_service.h" | 28 #include "chrome/browser/chromeos/gdata/gdata_system_service.h" |
29 #include "chrome/browser/chromeos/gdata/gdata_util.h" | 29 #include "chrome/browser/chromeos/gdata/gdata_util.h" |
30 #include "chrome/browser/chromeos/gdata/gdata_wapi_parser.h" | 30 #include "chrome/browser/chromeos/gdata/gdata_wapi_parser.h" |
| 31 #include "chrome/browser/chromeos/system/statistics_provider.h" |
31 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 32 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
32 #include "chrome/browser/extensions/extension_process_manager.h" | 33 #include "chrome/browser/extensions/extension_process_manager.h" |
33 #include "chrome/browser/extensions/extension_service.h" | 34 #include "chrome/browser/extensions/extension_service.h" |
34 #include "chrome/browser/extensions/extension_tab_util.h" | 35 #include "chrome/browser/extensions/extension_tab_util.h" |
35 #include "chrome/browser/extensions/process_map.h" | 36 #include "chrome/browser/extensions/process_map.h" |
36 #include "chrome/browser/profiles/profile.h" | 37 #include "chrome/browser/profiles/profile.h" |
37 #include "chrome/browser/ui/browser.h" | 38 #include "chrome/browser/ui/browser.h" |
38 #include "chrome/browser/ui/browser_window.h" | 39 #include "chrome/browser/ui/browser_window.h" |
39 #include "chrome/browser/ui/views/select_file_dialog_extension.h" | 40 #include "chrome/browser/ui/views/select_file_dialog_extension.h" |
40 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" | 41 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
(...skipping 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1626 SET_STRING(IDS_FILE_BROWSER, CONFIRM_MOBILE_DATA_USE); | 1627 SET_STRING(IDS_FILE_BROWSER, CONFIRM_MOBILE_DATA_USE); |
1627 SET_STRING(IDS_FILE_BROWSER, CONFIRM_MOBILE_DATA_USE_PLURAL); | 1628 SET_STRING(IDS_FILE_BROWSER, CONFIRM_MOBILE_DATA_USE_PLURAL); |
1628 SET_STRING(IDS_FILE_BROWSER, GDATA_OUT_OF_SPACE_HEADER); | 1629 SET_STRING(IDS_FILE_BROWSER, GDATA_OUT_OF_SPACE_HEADER); |
1629 SET_STRING(IDS_FILE_BROWSER, GDATA_OUT_OF_SPACE_MESSAGE); | 1630 SET_STRING(IDS_FILE_BROWSER, GDATA_OUT_OF_SPACE_MESSAGE); |
1630 SET_STRING(IDS_FILE_BROWSER, GDATA_SERVER_OUT_OF_SPACE_HEADER); | 1631 SET_STRING(IDS_FILE_BROWSER, GDATA_SERVER_OUT_OF_SPACE_HEADER); |
1631 SET_STRING(IDS_FILE_BROWSER, GDATA_SERVER_OUT_OF_SPACE_MESSAGE); | 1632 SET_STRING(IDS_FILE_BROWSER, GDATA_SERVER_OUT_OF_SPACE_MESSAGE); |
1632 SET_STRING(IDS_FILE_BROWSER, GDATA_WELCOME_TITLE); | 1633 SET_STRING(IDS_FILE_BROWSER, GDATA_WELCOME_TITLE); |
1633 SET_STRING(IDS_FILE_BROWSER, GDATA_WELCOME_TEXT_SHORT); | 1634 SET_STRING(IDS_FILE_BROWSER, GDATA_WELCOME_TEXT_SHORT); |
1634 SET_STRING(IDS_FILE_BROWSER, GDATA_WELCOME_TEXT_LONG); | 1635 SET_STRING(IDS_FILE_BROWSER, GDATA_WELCOME_TEXT_LONG); |
1635 SET_STRING(IDS_FILE_BROWSER, GDATA_WELCOME_DISMISS); | 1636 SET_STRING(IDS_FILE_BROWSER, GDATA_WELCOME_DISMISS); |
| 1637 SET_STRING(IDS_FILE_BROWSER, GDATA_WELCOME_TITLE_ALTERNATIVE); |
| 1638 SET_STRING(IDS_FILE_BROWSER, GDATA_WELCOME_GET_STARTED); |
1636 SET_STRING(IDS_FILE_BROWSER, NO_ACTION_FOR_FILE); | 1639 SET_STRING(IDS_FILE_BROWSER, NO_ACTION_FOR_FILE); |
1637 | 1640 |
1638 // MP3 metadata extractor plugin | 1641 // MP3 metadata extractor plugin |
1639 SET_STRING(IDS_FILE_BROWSER, ID3_ALBUM); // TALB | 1642 SET_STRING(IDS_FILE_BROWSER, ID3_ALBUM); // TALB |
1640 SET_STRING(IDS_FILE_BROWSER, ID3_BPM); // TBPM | 1643 SET_STRING(IDS_FILE_BROWSER, ID3_BPM); // TBPM |
1641 SET_STRING(IDS_FILE_BROWSER, ID3_COMPOSER); // TCOM | 1644 SET_STRING(IDS_FILE_BROWSER, ID3_COMPOSER); // TCOM |
1642 SET_STRING(IDS_FILE_BROWSER, ID3_COPYRIGHT_MESSAGE); // TCOP | 1645 SET_STRING(IDS_FILE_BROWSER, ID3_COPYRIGHT_MESSAGE); // TCOP |
1643 SET_STRING(IDS_FILE_BROWSER, ID3_DATE); // TDAT | 1646 SET_STRING(IDS_FILE_BROWSER, ID3_DATE); // TDAT |
1644 SET_STRING(IDS_FILE_BROWSER, ID3_PLAYLIST_DELAY); // TDLY | 1647 SET_STRING(IDS_FILE_BROWSER, ID3_PLAYLIST_DELAY); // TDLY |
1645 SET_STRING(IDS_FILE_BROWSER, ID3_ENCODED_BY); // TENC | 1648 SET_STRING(IDS_FILE_BROWSER, ID3_ENCODED_BY); // TENC |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1728 ChromeURLDataManager::DataSource::SetFontAndTextDirection(dict); | 1731 ChromeURLDataManager::DataSource::SetFontAndTextDirection(dict); |
1729 | 1732 |
1730 dict->SetBoolean("ENABLE_GDATA", gdata::util::IsGDataAvailable(profile())); | 1733 dict->SetBoolean("ENABLE_GDATA", gdata::util::IsGDataAvailable(profile())); |
1731 | 1734 |
1732 #if defined(USE_ASH) | 1735 #if defined(USE_ASH) |
1733 dict->SetBoolean("ASH", true); | 1736 dict->SetBoolean("ASH", true); |
1734 #else | 1737 #else |
1735 dict->SetBoolean("ASH", false); | 1738 dict->SetBoolean("ASH", false); |
1736 #endif | 1739 #endif |
1737 | 1740 |
| 1741 std::string board; |
| 1742 const char kMachineInfoBoard[] = "CHROMEOS_RELEASE_BOARD"; |
| 1743 chromeos::system::StatisticsProvider* provider = |
| 1744 chromeos::system::StatisticsProvider::GetInstance(); |
| 1745 if (!provider->GetMachineStatistic(kMachineInfoBoard, &board)) |
| 1746 board = "unknown"; |
| 1747 dict->SetString(kMachineInfoBoard, board); |
| 1748 |
1738 return true; | 1749 return true; |
1739 } | 1750 } |
1740 | 1751 |
1741 GetGDataFilePropertiesFunction::GetGDataFilePropertiesFunction() { | 1752 GetGDataFilePropertiesFunction::GetGDataFilePropertiesFunction() { |
1742 } | 1753 } |
1743 | 1754 |
1744 GetGDataFilePropertiesFunction::~GetGDataFilePropertiesFunction() { | 1755 GetGDataFilePropertiesFunction::~GetGDataFilePropertiesFunction() { |
1745 } | 1756 } |
1746 | 1757 |
1747 void GetGDataFilePropertiesFunction::DoOperation( | 1758 void GetGDataFilePropertiesFunction::DoOperation( |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2406 gdata::GDataSystemService* system_service = | 2417 gdata::GDataSystemService* system_service = |
2407 gdata::GDataSystemServiceFactory::GetForProfile(profile_); | 2418 gdata::GDataSystemServiceFactory::GetForProfile(profile_); |
2408 if (!system_service || !system_service->file_system()) | 2419 if (!system_service || !system_service->file_system()) |
2409 return false; | 2420 return false; |
2410 | 2421 |
2411 FilePath directory_path = GetVirtualPathFromURL(GURL(file_url_as_string)); | 2422 FilePath directory_path = GetVirtualPathFromURL(GURL(file_url_as_string)); |
2412 system_service->file_system()->RequestDirectoryRefresh(directory_path); | 2423 system_service->file_system()->RequestDirectoryRefresh(directory_path); |
2413 | 2424 |
2414 return true; | 2425 return true; |
2415 } | 2426 } |
OLD | NEW |