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

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

Issue 10411018: [FileBrowser] Added DefaultAction dialog to choose default action. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 return false; 621 return false;
622 622
623 result_.reset(new base::FundamentalValue(true)); 623 result_.reset(new base::FundamentalValue(true));
624 return true; 624 return true;
625 } 625 }
626 626
627 void ExecuteTasksFileBrowserFunction::OnTaskExecuted(bool success) { 627 void ExecuteTasksFileBrowserFunction::OnTaskExecuted(bool success) {
628 SendResponse(success); 628 SendResponse(success);
629 } 629 }
630 630
631 SetDefaultTaskFileBrowserFunction::SetDefaultTaskFileBrowserFunction() {}
632
633 SetDefaultTaskFileBrowserFunction::~SetDefaultTaskFileBrowserFunction() {}
634
635 bool SetDefaultTaskFileBrowserFunction::RunImpl() {
636 // First param is task id that was to the extension with setDefaultTask call.
637 std::string task_id;
638 if (!args_->GetString(0, &task_id) || !task_id.size())
639 return false;
640
641 file_handler_util::UpdateFileHandlerUsageStats(profile_, task_id);
dgozman 2012/05/18 14:50:06 This probably should be called on UI thread?
Dmitry Zvorygin 2012/05/22 14:32:59 Done.
642
643 result_.reset(new base::FundamentalValue(true));
644 SendResponse(true);
645 return true;
646 }
647
631 FileBrowserFunction::FileBrowserFunction() { 648 FileBrowserFunction::FileBrowserFunction() {
632 } 649 }
633 650
634 FileBrowserFunction::~FileBrowserFunction() { 651 FileBrowserFunction::~FileBrowserFunction() {
635 } 652 }
636 653
637 int32 FileBrowserFunction::GetTabId() const { 654 int32 FileBrowserFunction::GetTabId() const {
638 if (!dispatcher()) { 655 if (!dispatcher()) {
639 LOG(WARNING) << "No dispatcher"; 656 LOG(WARNING) << "No dispatcher";
640 return 0; 657 return 0;
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 else if (active_network->type() == chromeos::TYPE_CELLULAR) 2127 else if (active_network->type() == chromeos::TYPE_CELLULAR)
2111 type_string = "cellular"; 2128 type_string = "cellular";
2112 else 2129 else
2113 type_string = "ethernet"; // Currently we do not care about other types. 2130 type_string = "ethernet"; // Currently we do not care about other types.
2114 2131
2115 value->SetString("type", type_string); 2132 value->SetString("type", type_string);
2116 result_.reset(value.release()); 2133 result_.reset(value.release());
2117 2134
2118 return true; 2135 return true;
2119 } 2136 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698