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

Side by Side Diff: chrome/browser/automation/automation_provider.cc

Issue 10837125: Revert 149794 - DownloadItem::Observer::OnDownloadDestroyed() replaces DownloadItem::REMOVING (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1228/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_download_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/automation/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 DCHECK(parent); 297 DCHECK(parent);
298 return chrome::GetIndexOfTab(parent, controller->GetWebContents()); 298 return chrome::GetIndexOfTab(parent, controller->GetWebContents());
299 } 299 }
300 300
301 // TODO(phajdan.jr): move to TestingAutomationProvider. 301 // TODO(phajdan.jr): move to TestingAutomationProvider.
302 DictionaryValue* AutomationProvider::GetDictionaryFromDownloadItem( 302 DictionaryValue* AutomationProvider::GetDictionaryFromDownloadItem(
303 const DownloadItem* download) { 303 const DownloadItem* download) {
304 std::map<DownloadItem::DownloadState, std::string> state_to_string; 304 std::map<DownloadItem::DownloadState, std::string> state_to_string;
305 state_to_string[DownloadItem::IN_PROGRESS] = std::string("IN_PROGRESS"); 305 state_to_string[DownloadItem::IN_PROGRESS] = std::string("IN_PROGRESS");
306 state_to_string[DownloadItem::CANCELLED] = std::string("CANCELLED"); 306 state_to_string[DownloadItem::CANCELLED] = std::string("CANCELLED");
307 state_to_string[DownloadItem::REMOVING] = std::string("REMOVING");
307 state_to_string[DownloadItem::INTERRUPTED] = std::string("INTERRUPTED"); 308 state_to_string[DownloadItem::INTERRUPTED] = std::string("INTERRUPTED");
308 state_to_string[DownloadItem::COMPLETE] = std::string("COMPLETE"); 309 state_to_string[DownloadItem::COMPLETE] = std::string("COMPLETE");
309 310
310 std::map<DownloadItem::SafetyState, std::string> safety_state_to_string; 311 std::map<DownloadItem::SafetyState, std::string> safety_state_to_string;
311 safety_state_to_string[DownloadItem::SAFE] = std::string("SAFE"); 312 safety_state_to_string[DownloadItem::SAFE] = std::string("SAFE");
312 safety_state_to_string[DownloadItem::DANGEROUS] = std::string("DANGEROUS"); 313 safety_state_to_string[DownloadItem::DANGEROUS] = std::string("DANGEROUS");
313 safety_state_to_string[DownloadItem::DANGEROUS_BUT_VALIDATED] = 314 safety_state_to_string[DownloadItem::DANGEROUS_BUT_VALIDATED] =
314 std::string("DANGEROUS_BUT_VALIDATED"); 315 std::string("DANGEROUS_BUT_VALIDATED");
315 316
316 DictionaryValue* dl_item_value = new DictionaryValue; 317 DictionaryValue* dl_item_value = new DictionaryValue;
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 750
750 return NULL; 751 return NULL;
751 } 752 }
752 753
753 void AutomationProvider::SaveAsAsync(int tab_handle) { 754 void AutomationProvider::SaveAsAsync(int tab_handle) {
754 NavigationController* tab = NULL; 755 NavigationController* tab = NULL;
755 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); 756 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab);
756 if (web_contents) 757 if (web_contents)
757 web_contents->OnSavePage(); 758 web_contents->OnSavePage();
758 } 759 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_download_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698