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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 break; | 341 break; |
342 case content::DOWNLOAD_DANGER_TYPE_MAYBE_DANGEROUS_CONTENT: | 342 case content::DOWNLOAD_DANGER_TYPE_MAYBE_DANGEROUS_CONTENT: |
343 download_danger_type_string = "MAYBE_DANGEROUS_CONTENT"; | 343 download_danger_type_string = "MAYBE_DANGEROUS_CONTENT"; |
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: |
| 352 download_danger_type_string = "DANGEROUS_HOST"; |
| 353 break; |
351 case content::DOWNLOAD_DANGER_TYPE_MAX: | 354 case content::DOWNLOAD_DANGER_TYPE_MAX: |
352 NOTREACHED(); | 355 NOTREACHED(); |
353 download_danger_type_string = "UNKNOWN"; | 356 download_danger_type_string = "UNKNOWN"; |
354 break; | 357 break; |
355 } | 358 } |
356 DCHECK(download_danger_type_string); | 359 DCHECK(download_danger_type_string); |
357 if (!download_danger_type_string) | 360 if (!download_danger_type_string) |
358 download_danger_type_string = "UNKNOWN"; | 361 download_danger_type_string = "UNKNOWN"; |
359 | 362 |
360 DictionaryValue* dl_item_value = new DictionaryValue; | 363 DictionaryValue* dl_item_value = new DictionaryValue; |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 | 822 |
820 return NULL; | 823 return NULL; |
821 } | 824 } |
822 | 825 |
823 void AutomationProvider::SaveAsAsync(int tab_handle) { | 826 void AutomationProvider::SaveAsAsync(int tab_handle) { |
824 NavigationController* tab = NULL; | 827 NavigationController* tab = NULL; |
825 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); | 828 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); |
826 if (web_contents) | 829 if (web_contents) |
827 web_contents->OnSavePage(); | 830 web_contents->OnSavePage(); |
828 } | 831 } |
OLD | NEW |