Rename include_incognito function to include_incognito_information.

ExtensionFunction::include_incognito() is renamed to
ExtensionFunction::include_incognito_information() to provide more
clarity on the use cases.

Bug: 845845
Change-Id: I0ba7bf58faf763a2ca8a50bf15f4c82e75ea82a0
Reviewed-on: https://chromium-review.googlesource.com/1078810
Commit-Queue: Ramin Halavati <[email protected]>
Reviewed-by: Devlin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#564812}
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index 5abb7a6..11ff12e 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -64,10 +64,10 @@
 // appropriate message if the window cannot be found by id.
 Browser* GetBrowserInProfileWithId(Profile* profile,
                                    const int window_id,
-                                   bool include_incognito,
+                                   bool match_incognito_profile,
                                    std::string* error_message) {
   Profile* incognito_profile =
-      include_incognito && profile->HasOffTheRecordProfile()
+      match_incognito_profile && profile->HasOffTheRecordProfile()
           ? profile->GetOffTheRecordProfile()
           : nullptr;
   for (auto* browser : *BrowserList::GetInstance()) {
@@ -143,7 +143,8 @@
 
   // Ensure the selected browser is tabbed.
   if (!browser->is_type_tabbed() && browser->IsAttemptingToCloseBrowser())
-    browser = chrome::FindTabbedBrowser(profile, function->include_incognito());
+    browser = chrome::FindTabbedBrowser(
+        profile, function->include_incognito_information());
   if (!browser || !browser->window()) {
     if (error)
       *error = keys::kNoCurrentWindowError;
@@ -158,8 +159,8 @@
     int opener_id = *params.opener_tab_id;
 
     if (!ExtensionTabUtil::GetTabById(
-            opener_id, profile, function->include_incognito(), &opener_browser,
-            nullptr, &opener, nullptr)) {
+            opener_id, profile, function->include_incognito_information(),
+            &opener_browser, nullptr, &opener, nullptr)) {
       if (error) {
         *error = ErrorUtils::FormatErrorMessage(keys::kTabNotFoundError,
                                                 base::IntToString(opener_id));
@@ -286,10 +287,9 @@
     }
     return result;
   } else {
-    return GetBrowserInProfileWithId(details.GetProfile(),
-                                     window_id,
-                                     details.function()->include_incognito(),
-                                     error);
+    return GetBrowserInProfileWithId(
+        details.GetProfile(), window_id,
+        details.function()->include_incognito_information(), error);
   }
 }