| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
We should first determine the destination of the new API. Add new column on task page.
- Move FindTabbedBrowser() from BrowserCollection (base class) to
ProfileBrowserCollection (subclass), since it requires profile-aware
logic for match_original_profiles support.From browser_collection.cc? And match_original_profiles look like have a larger scope than `ProfileBrowserCollection`. We may need to find a better place to put `FindTabbedBrowser()`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
We should first determine the destination of the new API. Add new column on task page.
Sure.
- Move FindTabbedBrowser() from BrowserCollection (base class) to
ProfileBrowserCollection (subclass), since it requires profile-aware
logic for match_original_profiles support.From browser_collection.cc? And match_original_profiles look like have a larger scope than `ProfileBrowserCollection`. We may need to find a better place to put `FindTabbedBrowser()`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (!profile) {
return RespondNow(Error("No active browser."));
}We may not need this nullptr check since profile is from `Profile* profile = Profile::FromBrowserContext(browser_context());`
[&browser, original](BrowserWindowInterface* bwi) {Please try to avoid bwi
// When the extension has incognito access, search across both
// regular and incognito profiles in global activation order to
// replicate the old match_original_profiles semantics.
Profile* original = profile->GetOriginalProfile();
ForEachCurrentBrowserWindowInterfaceOrderedByActivation(
[&browser, original](BrowserWindowInterface* bwi) {
if (bwi->GetType() != BrowserWindowInterface::TYPE_NORMAL) {
return true;
}
if (bwi->IsDeleteScheduled()) {
return true;
}
if (bwi->GetProfile()->GetOriginalProfile() != original) {
return true;
}
browser = bwi;
return false; // stop iterating
});Maybe `ProfileBrowserCollection::GetForProfile(profile->GetOriginalProfile())` works here?
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "ui/display/screen.h"Better move these into
#if BUILDFLAG(IS_ANDROID)
#else
here
#endif
BrowserWindowInterface* browser_window =Maybe browser_window_interface/current_browser, browser_window is another class.
BrowserWindowInterface* browser_window =Same here.
BrowserWindowInterface* new_browser_window =Same here.
BrowserWindowInterface* browser_window =Same here
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (!profile) {
return RespondNow(Error("No active browser."));
}We may not need this nullptr check since profile is from `Profile* profile = Profile::FromBrowserContext(browser_context());`
SearchApiBrowserTest.NoActiveBrowser passed nullptr as BrowserContext results in an empty profile. Without this check, a null pointer exception will occur in subsequent calls to profile->GetOriginalProfile() or GetForProfile(profile).
Please try to avoid bwi
got it
// When the extension has incognito access, search across both
// regular and incognito profiles in global activation order to
// replicate the old match_original_profiles semantics.
Profile* original = profile->GetOriginalProfile();
ForEachCurrentBrowserWindowInterfaceOrderedByActivation(
[&browser, original](BrowserWindowInterface* bwi) {
if (bwi->GetType() != BrowserWindowInterface::TYPE_NORMAL) {
return true;
}
if (bwi->IsDeleteScheduled()) {
return true;
}
if (bwi->GetProfile()->GetOriginalProfile() != original) {
return true;
}
browser = bwi;
return false; // stop iterating
});Maybe `ProfileBrowserCollection::GetForProfile(profile->GetOriginalProfile())` works here?
It cannot match both normal and incognito browsers under the incognito path.
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "ui/display/screen.h"Better move these into
#if BUILDFLAG(IS_ANDROID)
#else
here
#endif
right
Maybe browser_window_interface/current_browser, browser_window is another class.
got it
BrowserWindowInterface* browser_window =Yu HeSame here.
ok
BrowserWindowInterface* new_browser_window =Yu HeSame here.
ok
BrowserWindowInterface* browser_window =Yu HeSame here
ok
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[bedrock] Migrate chrome::FindTabbedBrowser() to ProfileBrowserCollection::FindTabbedBrowser()The title may have exceeded the length limit.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |