Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / ios / chrome / browser / ui / show_privacy_settings_util.mm
blob12e878cda25250ff8d7a72bbfd2f6ccfe37fa8e1
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
3 // found in the LICENSE file.
5 #import "ios/chrome/browser/ui/show_privacy_settings_util.h"
7 #import "base/mac/scoped_nsobject.h"
8 #import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h"
9 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h"
10 #include "ios/chrome/browser/ui/commands/ios_command_ids.h"
12 void ShowClearBrowsingData() {
13   base::scoped_nsobject<GenericChromeCommand> command(
14       [[GenericChromeCommand alloc] initWithTag:IDC_SHOW_PRIVACY_SETTINGS]);
15   UIWindow* main_window = [[UIApplication sharedApplication] keyWindow];
16   [main_window chromeExecuteCommand:command];