| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/message_box_flags.h" | 10 #include "app/message_box_flags.h" |
| (...skipping 2477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2488 void AutomationProvider::GetEnabledExtensions( | 2488 void AutomationProvider::GetEnabledExtensions( |
| 2489 std::vector<FilePath>* result) { | 2489 std::vector<FilePath>* result) { |
| 2490 ExtensionsService* service = profile_->GetExtensionsService(); | 2490 ExtensionsService* service = profile_->GetExtensionsService(); |
| 2491 DCHECK(service); | 2491 DCHECK(service); |
| 2492 if (service->extensions_enabled()) { | 2492 if (service->extensions_enabled()) { |
| 2493 const ExtensionList* extensions = service->extensions(); | 2493 const ExtensionList* extensions = service->extensions(); |
| 2494 DCHECK(extensions); | 2494 DCHECK(extensions); |
| 2495 for (size_t i = 0; i < extensions->size(); ++i) { | 2495 for (size_t i = 0; i < extensions->size(); ++i) { |
| 2496 Extension* extension = (*extensions)[i]; | 2496 Extension* extension = (*extensions)[i]; |
| 2497 DCHECK(extension); | 2497 DCHECK(extension); |
| 2498 result->push_back(extension->path()); | 2498 if (extension->location() == Extension::INTERNAL) { |
| 2499 result->push_back(extension->path()); |
| 2500 } |
| 2499 } | 2501 } |
| 2500 } | 2502 } |
| 2501 } | 2503 } |
| 2502 | 2504 |
| 2503 void AutomationProvider::SaveAsAsync(int tab_handle) { | 2505 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 2504 NavigationController* tab = NULL; | 2506 NavigationController* tab = NULL; |
| 2505 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 2507 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
| 2506 if (tab_contents) | 2508 if (tab_contents) |
| 2507 tab_contents->OnSavePage(); | 2509 tab_contents->OnSavePage(); |
| 2508 } | 2510 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2519 HostContentSettingsMap* map = | 2521 HostContentSettingsMap* map = |
| 2520 browser->profile()->GetHostContentSettingsMap(); | 2522 browser->profile()->GetHostContentSettingsMap(); |
| 2521 if (host.empty()) { | 2523 if (host.empty()) { |
| 2522 map->SetDefaultContentSetting(content_type, setting); | 2524 map->SetDefaultContentSetting(content_type, setting); |
| 2523 } else { | 2525 } else { |
| 2524 map->SetContentSetting(host, content_type, setting); | 2526 map->SetContentSetting(host, content_type, setting); |
| 2525 } | 2527 } |
| 2526 *success = true; | 2528 *success = true; |
| 2527 } | 2529 } |
| 2528 } | 2530 } |
| OLD | NEW |