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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager_util.cc

Issue 10834383: Chrome OS "open with" picker allowing Web Intents (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: some fixes, haven't approached JS yet Created 8 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
OLDNEW
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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 // If File Browser has not been open yet then it did not request access 583 // If File Browser has not been open yet then it did not request access
584 // to the file system. Do it now. 584 // to the file system. Do it now.
585 fileapi::ExternalFileSystemMountPointProvider* external_provider = 585 fileapi::ExternalFileSystemMountPointProvider* external_provider =
586 BrowserContext::GetFileSystemContext(profile)->external_provider(); 586 BrowserContext::GetFileSystemContext(profile)->external_provider();
587 if (!external_provider) 587 if (!external_provider)
588 return false; 588 return false;
589 external_provider->GrantFullAccessToExtension(source_url.host()); 589 external_provider->GrantFullAccessToExtension(source_url.host());
590 590
591 std::vector<GURL> urls; 591 std::vector<GURL> urls;
592 urls.push_back(url); 592 urls.push_back(url);
593 scoped_refptr<FileTaskExecutor> executor = FileTaskExecutor::Create( 593 scoped_refptr<FileTaskExecutor> executor = FileTaskExecutor::Create(profile,
594 profile, source_url, extension_id, action_id); 594 source_url, extension_id, file_handler_util::TASK_FILE, action_id);
595 executor->Execute(urls); 595 executor->Execute(urls);
596 return true; 596 return true;
597 } 597 }
598 return ExecuteBuiltinHandler(browser, path, std::string()); 598 return ExecuteBuiltinHandler(browser, path, std::string());
599 } 599 }
600 600
601 void ViewFile(const FilePath& path) { 601 void ViewFile(const FilePath& path) {
602 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); 602 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
603 if (!ExecuteDefaultHandler(profile, path)) 603 if (!ExecuteDefaultHandler(profile, path))
604 ShowWarningMessageBox(profile, path); 604 ShowWarningMessageBox(profile, path);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 OperationRegistry::ProgressStatus>::const_iterator iter = 798 OperationRegistry::ProgressStatus>::const_iterator iter =
799 list.begin(); 799 list.begin();
800 iter != list.end(); ++iter) { 800 iter != list.end(); ++iter) {
801 result_list->Append( 801 result_list->Append(
802 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); 802 ProgessStatusToDictionaryValue(profile, origin_url, *iter));
803 } 803 }
804 return result_list.release(); 804 return result_list.release();
805 } 805 }
806 806
807 } // namespace file_manager_util 807 } // namespace file_manager_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698