| 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 "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 std::vector<GURL> urls; | 517 std::vector<GURL> urls; |
| 518 urls.push_back(url); | 518 urls.push_back(url); |
| 519 scoped_refptr<StandaloneExecutor> executor = new StandaloneExecutor( | 519 scoped_refptr<StandaloneExecutor> executor = new StandaloneExecutor( |
| 520 profile, source_url, extension_id, action_id); | 520 profile, source_url, extension_id, action_id); |
| 521 executor->Execute(urls); | 521 executor->Execute(urls); |
| 522 return true; | 522 return true; |
| 523 } | 523 } |
| 524 return false; | 524 return false; |
| 525 } | 525 } |
| 526 | 526 |
| 527 void ViewFile(const FilePath& path, bool deprecated_enqueue) { | 527 void ViewFile(const FilePath& path) { |
| 528 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); | 528 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); |
| 529 if (!TryOpeningFileBrowser(profile, path) && | 529 if (!TryOpeningFileBrowser(profile, path) && |
| 530 !TryViewingFile(profile, path)) { | 530 !TryViewingFile(profile, path)) { |
| 531 Browser* browser = Browser::GetOrCreateTabbedBrowser(profile); | 531 Browser* browser = Browser::GetOrCreateTabbedBrowser(profile); |
| 532 browser::ShowErrorBox( | 532 browser::ShowErrorBox( |
| 533 browser->window()->GetNativeHandle(), | 533 browser->window()->GetNativeHandle(), |
| 534 l10n_util::GetStringFUTF16( | 534 l10n_util::GetStringFUTF16( |
| 535 IDS_FILE_BROWSER_ERROR_VIEWING_FILE_TITLE, | 535 IDS_FILE_BROWSER_ERROR_VIEWING_FILE_TITLE, |
| 536 UTF8ToUTF16(path.BaseName().value())), | 536 UTF8ToUTF16(path.BaseName().value())), |
| 537 l10n_util::GetStringUTF16( | 537 l10n_util::GetStringUTF16( |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 GDataOperationRegistry::ProgressStatus>::const_iterator iter = | 716 GDataOperationRegistry::ProgressStatus>::const_iterator iter = |
| 717 list.begin(); | 717 list.begin(); |
| 718 iter != list.end(); ++iter) { | 718 iter != list.end(); ++iter) { |
| 719 result_list->Append( | 719 result_list->Append( |
| 720 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); | 720 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); |
| 721 } | 721 } |
| 722 return result_list.release(); | 722 return result_list.release(); |
| 723 } | 723 } |
| 724 | 724 |
| 725 } // namespace file_manager_util | 725 } // namespace file_manager_util |
| OLD | NEW |