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

Unified Diff: chrome/browser/chromeos/gdata/drive_task_executor.cc

Issue 10834383: Chrome OS "open with" picker allowing Web Intents (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: reorder class, revert net/* 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/gdata/drive_task_executor.cc
diff --git a/chrome/browser/chromeos/gdata/drive_task_executor.cc b/chrome/browser/chromeos/gdata/drive_task_executor.cc
index 312f73de3046e7295093b926c0754fafb67e705b..c9c18315a56c6e56e2b62d2d73f50ad2d565e620 100644
--- a/chrome/browser/chromeos/gdata/drive_task_executor.cc
+++ b/chrome/browser/chromeos/gdata/drive_task_executor.cc
@@ -31,17 +31,10 @@ using file_handler_util::FileTaskExecutor;
DriveTaskExecutor::DriveTaskExecutor(Profile* profile,
const std::string& app_id,
const std::string& action_id)
- : file_handler_util::FileTaskExecutor(profile),
- app_id_(app_id),
+ : file_handler_util::FileTaskExecutor(profile, app_id),
action_id_(action_id),
current_index_(0) {
DCHECK("open-with" == action_id_);
- DCHECK(app_id.size() > FileTaskExecutor::kDriveTaskExtensionPrefixLength);
- DCHECK(StartsWithASCII(app_id,
- FileTaskExecutor::kDriveTaskExtensionPrefix,
- false));
- // Strip off the prefix from the extension ID so we convert it to an app id.
- app_id_ = app_id_.substr(FileTaskExecutor::kDriveTaskExtensionPrefixLength);
}
DriveTaskExecutor::~DriveTaskExecutor() {
@@ -105,7 +98,7 @@ void DriveTaskExecutor::OnFileEntryFetched(
// open-with-<app_id> urls from the document entry.
drive_service->AuthorizeApp(
GURL(entry_proto->edit_url()),
- app_id_,
+ extension_id(), // really app_id
base::Bind(&DriveTaskExecutor::OnAppAuthorized,
this,
entry_proto->resource_id()));
@@ -138,7 +131,7 @@ void DriveTaskExecutor::OnAppAuthorized(
link_list->GetDictionary(i, &entry);
std::string app_id;
entry->GetString("app_id", &app_id);
- if (app_id == app_id_) {
+ if (app_id == extension_id()) {
std::string href;
entry->GetString("href", &href);
open_with_url = GURL(href);

Powered by Google App Engine
This is Rietveld 408576698