Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: ios/chrome/browser/web/print_observer.mm

Issue 2823953004: [ObjC ARC] Converts ios/chrome/browser/web:web_internal to ARC. (Closed)
Patch Set: Address comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/web/external_app_launcher.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/web/print_observer.mm
diff --git a/ios/chrome/browser/web/print_observer.mm b/ios/chrome/browser/web/print_observer.mm
index 0be1238e96cd98140b6abfdb4afd84e16311e8dd..c8830087389be4394c75bc86f175d870bd5c5602 100644
--- a/ios/chrome/browser/web/print_observer.mm
+++ b/ios/chrome/browser/web/print_observer.mm
@@ -6,13 +6,16 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
-#import "base/mac/scoped_nsobject.h"
#include "base/values.h"
#import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h"
#import "ios/chrome/browser/ui/commands/generic_chrome_command.h"
#include "ios/chrome/browser/ui/commands/ios_command_ids.h"
#import "ios/web/public/web_state/web_state.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
// Prefix for print JavaScript command.
const char kPrintCommandPrefix[] = "print";
@@ -36,8 +39,8 @@ void PrintObserver::WebStateDestroyed() {
bool PrintObserver::OnPrintCommand(const base::DictionaryValue&,
const GURL&,
bool) {
- base::scoped_nsobject<GenericChromeCommand> print_command(
- [[GenericChromeCommand alloc] initWithTag:IDC_PRINT]);
+ GenericChromeCommand* print_command =
+ [[GenericChromeCommand alloc] initWithTag:IDC_PRINT];
[web_state()->GetView() chromeExecuteCommand:print_command];
return true;
}
« no previous file with comments | « ios/chrome/browser/web/external_app_launcher.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698