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

Unified Diff: ios/shared/chrome/browser/tabs/web_state_list.h

Issue 2710183003: Fix WebStateListObserver::WebStateDetachedAt() parameter lifetime. (Closed)
Patch Set: Fix typos. Created 3 years, 10 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/tabs/tab_model.mm ('k') | ios/shared/chrome/browser/tabs/web_state_list.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/shared/chrome/browser/tabs/web_state_list.h
diff --git a/ios/shared/chrome/browser/tabs/web_state_list.h b/ios/shared/chrome/browser/tabs/web_state_list.h
index 984bc78c0e49b054621e9216d7a6670dbb44fc04..b8bc5d3b32fdd28e5f61acb443a2610ab4e14b37 100644
--- a/ios/shared/chrome/browser/tabs/web_state_list.h
+++ b/ios/shared/chrome/browser/tabs/web_state_list.h
@@ -8,6 +8,7 @@
#include <memory>
#include <vector>
+#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/observer_list.h"
#include "ui/base/page_transition_types.h"
@@ -94,10 +95,11 @@ class WebStateList {
// returned WebState). An optional opener for the new WebState may be passed.
web::WebState* ReplaceWebStateAt(int index,
web::WebState* web_state,
- web::WebState* opener);
+ web::WebState* opener) WARN_UNUSED_RESULT;
- // Detaches the WebState at the specified index.
- void DetachWebStateAt(int index);
+ // Detaches the WebState at the specified index. Returns the detached WebState
+ // to the caller (abandon ownership of the returned WebState).
+ web::WebState* DetachWebStateAt(int index) WARN_UNUSED_RESULT;
// Adds an observer to the model.
void AddObserver(WebStateListObserver* observer);
« no previous file with comments | « ios/chrome/browser/tabs/tab_model.mm ('k') | ios/shared/chrome/browser/tabs/web_state_list.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698