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

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

Issue 10386206: RefCounted types should not have public destructors, chromeos edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r143931 Created 8 years, 6 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 | Annotate | Revision Log
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 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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 return false; 683 return false;
684 684
685 // TODO(zelidrag, serya): Add intent content tasks to result_list once we 685 // TODO(zelidrag, serya): Add intent content tasks to result_list once we
686 // implement that API. 686 // implement that API.
687 SendResponse(true); 687 SendResponse(true);
688 return true; 688 return true;
689 } 689 }
690 690
691 ExecuteTasksFileBrowserFunction::ExecuteTasksFileBrowserFunction() {} 691 ExecuteTasksFileBrowserFunction::ExecuteTasksFileBrowserFunction() {}
692 692
693 void ExecuteTasksFileBrowserFunction::OnTaskExecuted(bool success) {
694 SendResponse(success);
695 }
696
693 ExecuteTasksFileBrowserFunction::~ExecuteTasksFileBrowserFunction() {} 697 ExecuteTasksFileBrowserFunction::~ExecuteTasksFileBrowserFunction() {}
694 698
695 bool ExecuteTasksFileBrowserFunction::RunImpl() { 699 bool ExecuteTasksFileBrowserFunction::RunImpl() {
696 // First param is task id that was to the extension with getFileTasks call. 700 // First param is task id that was to the extension with getFileTasks call.
697 std::string task_id; 701 std::string task_id;
698 if (!args_->GetString(0, &task_id) || !task_id.size()) 702 if (!args_->GetString(0, &task_id) || !task_id.size())
699 return false; 703 return false;
700 704
701 // TODO(kaznacheev): Crack the task_id here, store it in the Executor 705 // TODO(kaznacheev): Crack the task_id here, store it in the Executor
702 // and avoid passing it around. 706 // and avoid passing it around.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 739
736 if (!executor->ExecuteAndNotify( 740 if (!executor->ExecuteAndNotify(
737 file_urls, 741 file_urls,
738 base::Bind(&ExecuteTasksFileBrowserFunction::OnTaskExecuted, this))) 742 base::Bind(&ExecuteTasksFileBrowserFunction::OnTaskExecuted, this)))
739 return false; 743 return false;
740 744
741 result_.reset(new base::FundamentalValue(true)); 745 result_.reset(new base::FundamentalValue(true));
742 return true; 746 return true;
743 } 747 }
744 748
745 void ExecuteTasksFileBrowserFunction::OnTaskExecuted(bool success) {
746 SendResponse(success);
747 }
748
749 SetDefaultTaskFileBrowserFunction::SetDefaultTaskFileBrowserFunction() {} 749 SetDefaultTaskFileBrowserFunction::SetDefaultTaskFileBrowserFunction() {}
750 750
751 SetDefaultTaskFileBrowserFunction::~SetDefaultTaskFileBrowserFunction() {} 751 SetDefaultTaskFileBrowserFunction::~SetDefaultTaskFileBrowserFunction() {}
752 752
753 bool SetDefaultTaskFileBrowserFunction::RunImpl() { 753 bool SetDefaultTaskFileBrowserFunction::RunImpl() {
754 // First param is task id that was to the extension with setDefaultTask call. 754 // First param is task id that was to the extension with setDefaultTask call.
755 std::string task_id; 755 std::string task_id;
756 if (!args_->GetString(0, &task_id) || !task_id.size()) 756 if (!args_->GetString(0, &task_id) || !task_id.size())
757 return false; 757 return false;
758 758
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after
2345 gdata::GDataSystemService* system_service = 2345 gdata::GDataSystemService* system_service =
2346 gdata::GDataSystemServiceFactory::GetForProfile(profile_); 2346 gdata::GDataSystemServiceFactory::GetForProfile(profile_);
2347 if (!system_service || !system_service->file_system()) 2347 if (!system_service || !system_service->file_system())
2348 return false; 2348 return false;
2349 2349
2350 FilePath directory_path = GetVirtualPathFromURL(GURL(file_url_as_string)); 2350 FilePath directory_path = GetVirtualPathFromURL(GURL(file_url_as_string));
2351 system_service->file_system()->RequestDirectoryRefresh(directory_path); 2351 system_service->file_system()->RequestDirectoryRefresh(directory_path);
2352 2352
2353 return true; 2353 return true;
2354 } 2354 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_browser_private_api.h ('k') | chrome/browser/chromeos/extensions/file_handler_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698