| OLD | NEW |
| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 break; | 344 break; |
| 345 case content::DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT: | 345 case content::DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT: |
| 346 download_danger_type_string = "UNCOMMON_CONTENT"; | 346 download_danger_type_string = "UNCOMMON_CONTENT"; |
| 347 break; | 347 break; |
| 348 case content::DOWNLOAD_DANGER_TYPE_USER_VALIDATED: | 348 case content::DOWNLOAD_DANGER_TYPE_USER_VALIDATED: |
| 349 download_danger_type_string = "USER_VALIDATED"; | 349 download_danger_type_string = "USER_VALIDATED"; |
| 350 break; | 350 break; |
| 351 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST: | 351 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST: |
| 352 download_danger_type_string = "DANGEROUS_HOST"; | 352 download_danger_type_string = "DANGEROUS_HOST"; |
| 353 break; | 353 break; |
| 354 case content::DOWNLOAD_DANGER_TYPE_POTENTIALLY_UNWANTED: |
| 355 download_danger_type_string = "POTENTIALLY_UNWANTED"; |
| 356 break; |
| 354 case content::DOWNLOAD_DANGER_TYPE_MAX: | 357 case content::DOWNLOAD_DANGER_TYPE_MAX: |
| 355 NOTREACHED(); | 358 NOTREACHED(); |
| 356 download_danger_type_string = "UNKNOWN"; | 359 download_danger_type_string = "UNKNOWN"; |
| 357 break; | 360 break; |
| 358 } | 361 } |
| 359 DCHECK(download_danger_type_string); | 362 DCHECK(download_danger_type_string); |
| 360 if (!download_danger_type_string) | 363 if (!download_danger_type_string) |
| 361 download_danger_type_string = "UNKNOWN"; | 364 download_danger_type_string = "UNKNOWN"; |
| 362 | 365 |
| 363 DictionaryValue* dl_item_value = new DictionaryValue; | 366 DictionaryValue* dl_item_value = new DictionaryValue; |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 | 828 |
| 826 return NULL; | 829 return NULL; |
| 827 } | 830 } |
| 828 | 831 |
| 829 void AutomationProvider::SaveAsAsync(int tab_handle) { | 832 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 830 NavigationController* tab = NULL; | 833 NavigationController* tab = NULL; |
| 831 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); | 834 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); |
| 832 if (web_contents) | 835 if (web_contents) |
| 833 web_contents->OnSavePage(); | 836 web_contents->OnSavePage(); |
| 834 } | 837 } |
| OLD | NEW |