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

Side by Side Diff: components/dom_distiller/ios/distiller_page_ios.mm

Issue 1586833002: Convert Pass()→std::move() for iOS build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert accidental //base change Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/dom_distiller/ios/distiller_page_ios.h" 5 #include "components/dom_distiller/ios/distiller_page_ios.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include <utility>
10
9 #include "base/json/json_reader.h" 11 #include "base/json/json_reader.h"
10 #include "base/logging.h" 12 #include "base/logging.h"
11 #include "base/strings/sys_string_conversions.h" 13 #include "base/strings/sys_string_conversions.h"
12 #include "base/values.h" 14 #include "base/values.h"
13 #include "ios/public/provider/web/web_controller_provider.h" 15 #include "ios/public/provider/web/web_controller_provider.h"
14 #include "ios/web/public/browser_state.h" 16 #include "ios/web/public/browser_state.h"
15 17
16 namespace dom_distiller { 18 namespace dom_distiller {
17 19
18 // Helper class for observing the loading of URLs to distill. 20 // Helper class for observing the loading of URLs to distill.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 }); 102 });
101 } 103 }
102 104
103 void DistillerPageIOS::HandleJavaScriptResultString(NSString* result) { 105 void DistillerPageIOS::HandleJavaScriptResultString(NSString* result) {
104 scoped_ptr<base::Value> resultValue = base::Value::CreateNullValue(); 106 scoped_ptr<base::Value> resultValue = base::Value::CreateNullValue();
105 if (result.length) { 107 if (result.length) {
106 scoped_ptr<base::Value> dictionaryValue = 108 scoped_ptr<base::Value> dictionaryValue =
107 base::JSONReader::Read(base::SysNSStringToUTF8(result)); 109 base::JSONReader::Read(base::SysNSStringToUTF8(result));
108 if (dictionaryValue && 110 if (dictionaryValue &&
109 dictionaryValue->IsType(base::Value::TYPE_DICTIONARY)) { 111 dictionaryValue->IsType(base::Value::TYPE_DICTIONARY)) {
110 resultValue = dictionaryValue.Pass(); 112 resultValue = std::move(dictionaryValue);
111 } 113 }
112 } 114 }
113 OnDistillationDone(url_, resultValue.get()); 115 OnDistillationDone(url_, resultValue.get());
114 } 116 }
115 117
116 } // namespace dom_distiller 118 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « chrome/browser/policy/profile_policy_connector_stub.cc ('k') | components/sessions/ios/ios_serialized_navigation_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698