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

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

Issue 9692049: Gave native File Browser file handlers higher priority than 3rd party handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 // We need case-insensitive matching, and pattern in handler is already 551 // We need case-insensitive matching, and pattern in handler is already
552 // in lower case. 552 // in lower case.
553 StringToLowerASCII(&file_url); 553 StringToLowerASCII(&file_url);
554 file_urls.push_back(GURL(file_url)); 554 file_urls.push_back(GURL(file_url));
555 } 555 }
556 556
557 ListValue* result_list = new ListValue(); 557 ListValue* result_list = new ListValue();
558 result_.reset(result_list); 558 result_.reset(result_list);
559 559
560 file_handler_util::LastUsedHandlerList common_tasks; 560 file_handler_util::LastUsedHandlerList common_tasks;
561 if (!file_handler_util::FindCommonTasks(profile_, file_urls, &common_tasks)) 561 if (!file_handler_util::FindCommonTasks(
562 profile_,
563 file_urls,
564 kFileBrowserDomain,
565 &common_tasks))
562 return false; 566 return false;
563 567
564 ExtensionService* service = profile_->GetExtensionService(); 568 ExtensionService* service = profile_->GetExtensionService();
565 for (file_handler_util::LastUsedHandlerList::const_iterator iter = 569 for (file_handler_util::LastUsedHandlerList::const_iterator iter =
566 common_tasks.begin(); 570 common_tasks.begin();
567 iter != common_tasks.end(); 571 iter != common_tasks.end();
568 ++iter) { 572 ++iter) {
569 const FileBrowserHandler* handler = iter->handler; 573 const FileBrowserHandler* handler = iter->handler;
570 const std::string extension_id = handler->extension_id(); 574 const std::string extension_id = handler->extension_id();
571 const Extension* extension = service->GetExtensionById(extension_id, false); 575 const Extension* extension = service->GetExtensionById(extension_id, false);
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 local_paths_->Append(Value::CreateStringValue("")); 1710 local_paths_->Append(Value::CreateStringValue(""));
1707 DVLOG(1) << "Failed to get " << gdata_path.value() 1711 DVLOG(1) << "Failed to get " << gdata_path.value()
1708 << " with error code: " << error; 1712 << " with error code: " << error;
1709 } 1713 }
1710 1714
1711 remaining_gdata_paths_.pop(); 1715 remaining_gdata_paths_.pop();
1712 1716
1713 // Start getting the next file. 1717 // Start getting the next file.
1714 GetFileOrSendResponse(); 1718 GetFileOrSendResponse();
1715 } 1719 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698