OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #import "ios/chrome/browser/ui/show_privacy_settings_util.h" | 5 #import "ios/chrome/browser/ui/show_privacy_settings_util.h" |
6 | 6 |
| 7 #import "base/mac/scoped_nsobject.h" |
7 #import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h" | 8 #import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h" |
8 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" | 9 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" |
9 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" | 10 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" |
10 | 11 |
11 #if !defined(__has_feature) || !__has_feature(objc_arc) | |
12 #error "This file requires ARC support." | |
13 #endif | |
14 | |
15 void ShowClearBrowsingData() { | 12 void ShowClearBrowsingData() { |
16 GenericChromeCommand* command = [[GenericChromeCommand alloc] | 13 base::scoped_nsobject<GenericChromeCommand> command( |
17 initWithTag:IDC_SHOW_CLEAR_BROWSING_DATA_SETTINGS]; | 14 [[GenericChromeCommand alloc] |
| 15 initWithTag:IDC_SHOW_CLEAR_BROWSING_DATA_SETTINGS]); |
18 UIWindow* main_window = [[UIApplication sharedApplication] keyWindow]; | 16 UIWindow* main_window = [[UIApplication sharedApplication] keyWindow]; |
19 [main_window chromeExecuteCommand:command]; | 17 [main_window chromeExecuteCommand:command]; |
20 } | 18 } |
OLD | NEW |