| 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 2279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2290 } | 2290 } |
| 2291 | 2291 |
| 2292 void AutomationProvider::ReloadAsync(int tab_handle) { | 2292 void AutomationProvider::ReloadAsync(int tab_handle) { |
| 2293 if (tab_tracker_->ContainsHandle(tab_handle)) { | 2293 if (tab_tracker_->ContainsHandle(tab_handle)) { |
| 2294 NavigationController* tab = tab_tracker_->GetResource(tab_handle); | 2294 NavigationController* tab = tab_tracker_->GetResource(tab_handle); |
| 2295 if (!tab) { | 2295 if (!tab) { |
| 2296 NOTREACHED(); | 2296 NOTREACHED(); |
| 2297 return; | 2297 return; |
| 2298 } | 2298 } |
| 2299 | 2299 |
| 2300 tab->Reload(false); | 2300 const bool check_for_repost = true; |
| 2301 tab->Reload(check_for_repost); |
| 2301 } | 2302 } |
| 2302 } | 2303 } |
| 2303 | 2304 |
| 2304 void AutomationProvider::StopAsync(int tab_handle) { | 2305 void AutomationProvider::StopAsync(int tab_handle) { |
| 2305 RenderViewHost* view = GetViewForTab(tab_handle); | 2306 RenderViewHost* view = GetViewForTab(tab_handle); |
| 2306 if (!view) { | 2307 if (!view) { |
| 2307 // We tolerate StopAsync being called even before a view has been created. | 2308 // We tolerate StopAsync being called even before a view has been created. |
| 2308 // So just log a warning instead of a NOTREACHED(). | 2309 // So just log a warning instead of a NOTREACHED(). |
| 2309 DLOG(WARNING) << "StopAsync: no view for handle " << tab_handle; | 2310 DLOG(WARNING) << "StopAsync: no view for handle " << tab_handle; |
| 2310 return; | 2311 return; |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2503 HostContentSettingsMap* map = | 2504 HostContentSettingsMap* map = |
| 2504 browser->profile()->GetHostContentSettingsMap(); | 2505 browser->profile()->GetHostContentSettingsMap(); |
| 2505 if (host.empty()) { | 2506 if (host.empty()) { |
| 2506 map->SetDefaultContentSetting(content_type, setting); | 2507 map->SetDefaultContentSetting(content_type, setting); |
| 2507 } else { | 2508 } else { |
| 2508 map->SetContentSetting(host, content_type, setting); | 2509 map->SetContentSetting(host, content_type, setting); |
| 2509 } | 2510 } |
| 2510 *success = true; | 2511 *success = true; |
| 2511 } | 2512 } |
| 2512 } | 2513 } |
| OLD | NEW |