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

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: address tbarzic comments 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 // If File Browser has not been open yet then it did not request access 563 // If File Browser has not been open yet then it did not request access
564 // to the file system. Do it now. 564 // to the file system. Do it now.
565 fileapi::ExternalFileSystemMountPointProvider* external_provider = 565 fileapi::ExternalFileSystemMountPointProvider* external_provider =
566 BrowserContext::GetFileSystemContext(profile)->external_provider(); 566 BrowserContext::GetFileSystemContext(profile)->external_provider();
567 if (!external_provider) 567 if (!external_provider)
568 return false; 568 return false;
569 external_provider->GrantFullAccessToExtension(source_url.host()); 569 external_provider->GrantFullAccessToExtension(source_url.host());
570 570
571 std::vector<GURL> urls; 571 std::vector<GURL> urls;
572 urls.push_back(url); 572 urls.push_back(url);
573 scoped_refptr<FileTaskExecutor> executor = FileTaskExecutor::Create( 573 scoped_refptr<FileTaskExecutor> executor = FileTaskExecutor::Create(profile,
574 profile, source_url, extension_id, action_id); 574 source_url, extension_id, file_handler_util::TASK_FILE, action_id);
575 executor->Execute(urls); 575 executor->Execute(urls);
576 return true; 576 return true;
577 } 577 }
578 return ExecuteBuiltinHandler(browser, path, std::string()); 578 return ExecuteBuiltinHandler(browser, path, std::string());
579 } 579 }
580 580
581 void ViewFile(const FilePath& path) { 581 void ViewFile(const FilePath& path) {
582 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); 582 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
583 if (!ExecuteDefaultHandler(profile, path)) 583 if (!ExecuteDefaultHandler(profile, path))
584 ShowWarningMessageBox(profile, path); 584 ShowWarningMessageBox(profile, path);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 OperationRegistry::ProgressStatus>::const_iterator iter = 778 OperationRegistry::ProgressStatus>::const_iterator iter =
779 list.begin(); 779 list.begin();
780 iter != list.end(); ++iter) { 780 iter != list.end(); ++iter) {
781 result_list->Append( 781 result_list->Append(
782 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); 782 ProgessStatusToDictionaryValue(profile, origin_url, *iter));
783 } 783 }
784 return result_list.release(); 784 return result_list.release();
785 } 785 }
786 786
787 } // namespace file_manager_util 787 } // namespace file_manager_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698