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

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: tiny 80 chars fix 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // If File Browser has not been open yet then it did not request access 557 // If File Browser has not been open yet then it did not request access
558 // to the file system. Do it now. 558 // to the file system. Do it now.
559 fileapi::ExternalFileSystemMountPointProvider* external_provider = 559 fileapi::ExternalFileSystemMountPointProvider* external_provider =
560 BrowserContext::GetFileSystemContext(profile)->external_provider(); 560 BrowserContext::GetFileSystemContext(profile)->external_provider();
561 if (!external_provider) 561 if (!external_provider)
562 return false; 562 return false;
563 external_provider->GrantFullAccessToExtension(source_url.host()); 563 external_provider->GrantFullAccessToExtension(source_url.host());
564 564
565 std::vector<GURL> urls; 565 std::vector<GURL> urls;
566 urls.push_back(url); 566 urls.push_back(url);
567 scoped_refptr<FileTaskExecutor> executor = FileTaskExecutor::Create( 567 scoped_refptr<FileTaskExecutor> executor = FileTaskExecutor::Create(profile,
568 profile, source_url, extension_id, action_id); 568 source_url, extension_id, file_handler_util::TASK_FILE, action_id);
569 executor->Execute(urls); 569 executor->Execute(urls);
570 return true; 570 return true;
571 } 571 }
572 return ExecuteBuiltinHandler(browser, path, std::string()); 572 return ExecuteBuiltinHandler(browser, path, std::string());
573 } 573 }
574 574
575 void ViewFile(const FilePath& path) { 575 void ViewFile(const FilePath& path) {
576 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); 576 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
577 if (!ExecuteDefaultHandler(profile, path)) 577 if (!ExecuteDefaultHandler(profile, path))
578 ShowWarningMessageBox(profile, path); 578 ShowWarningMessageBox(profile, path);
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 OperationRegistry::ProgressStatus>::const_iterator iter = 771 OperationRegistry::ProgressStatus>::const_iterator iter =
772 list.begin(); 772 list.begin();
773 iter != list.end(); ++iter) { 773 iter != list.end(); ++iter) {
774 result_list->Append( 774 result_list->Append(
775 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); 775 ProgessStatusToDictionaryValue(profile, origin_url, *iter));
776 } 776 }
777 return result_list.release(); 777 return result_list.release();
778 } 778 }
779 779
780 } // namespace file_manager_util 780 } // namespace file_manager_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698