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

Side by Side Diff: extensions/browser/api/web_request/web_request_api.cc

Issue 2051663003: base::ListValue::Append cleanup: pass unique_ptr instead of the released pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "extensions/browser/api/web_request/web_request_api.h" 5 #include "extensions/browser/api/web_request/web_request_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 if (mod.modification) { 1537 if (mod.modification) {
1538 if (mod.modification->name) { 1538 if (mod.modification->name) {
1539 summary->SetString(activity_log::kCookieModDomainKey, 1539 summary->SetString(activity_log::kCookieModDomainKey,
1540 *mod.modification->name); 1540 *mod.modification->name);
1541 } 1541 }
1542 if (mod.modification->domain) { 1542 if (mod.modification->domain) {
1543 summary->SetString(activity_log::kCookieModDomainKey, 1543 summary->SetString(activity_log::kCookieModDomainKey,
1544 *mod.modification->name); 1544 *mod.modification->name);
1545 } 1545 }
1546 } 1546 }
1547 cookie_modifications->Append(summary.release()); 1547 cookie_modifications->Append(std::move(summary));
1548 } 1548 }
1549 return cookie_modifications.release(); 1549 return cookie_modifications.release();
1550 } 1550 }
1551 1551
1552 // Converts an EventResponseDelta object to a dictionary value suitable for the 1552 // Converts an EventResponseDelta object to a dictionary value suitable for the
1553 // activity log. 1553 // activity log.
1554 std::unique_ptr<base::DictionaryValue> SummarizeResponseDelta( 1554 std::unique_ptr<base::DictionaryValue> SummarizeResponseDelta(
1555 const std::string& event_name, 1555 const std::string& event_name,
1556 const helpers::EventResponseDelta& delta) { 1556 const helpers::EventResponseDelta& delta) {
1557 std::unique_ptr<base::DictionaryValue> details(new base::DictionaryValue()); 1557 std::unique_ptr<base::DictionaryValue> details(new base::DictionaryValue());
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2294 // Continue gracefully. 2294 // Continue gracefully.
2295 RunSync(); 2295 RunSync();
2296 } 2296 }
2297 2297
2298 bool WebRequestHandlerBehaviorChangedFunction::RunSync() { 2298 bool WebRequestHandlerBehaviorChangedFunction::RunSync() {
2299 helpers::ClearCacheOnNavigation(); 2299 helpers::ClearCacheOnNavigation();
2300 return true; 2300 return true;
2301 } 2301 }
2302 2302
2303 } // namespace extensions 2303 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698