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

Issue 107033003: Stop using GetDefaultProfile() in Chrome OS implementation of platform_util::OpenExternal() (Closed)

Created:
7 years ago by hashimoto
Modified:
7 years ago
Reviewers:
sky
CC:
chromium-reviews
Visibility:
Public.

Description

Stop using GetDefaultProfile() in Chrome OS implementation of platform_util::OpenExternal() Add Profile* as an argument of OpenExternal(). Disallow calling OpenExternal() from threads other than UI thread. Changes for the implementations: Chrome OS implementation: Use the argument Profile and stop posting tasks to UI thread. Win implementation: Post tasks to FILE thread. (for the reason noted in external_protocol_handler.cc) Other implementations: Just add Profile* argument and add thread check. Changes for user code: 1. first_run_dialog.cc: Just pass Profile*. 2. browser_commands.cc: Pass Profile* acquired from Browser. 3. chrome_shell_window_delegate.cc: Pass Profile* acquired from WebContents. 4. external_protocol_handler.cc: Pass Profile* acquired with a pair of render_process_host_id and tab_contents_id. BUG=322682 TEST=git cl try Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=240346

Patch Set 1 : #

Total comments: 5

Patch Set 2 : rebase #

Patch Set 3 : Remove is_valid check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -113 lines) Patch
M chrome/browser/external_protocol/external_protocol_handler.h View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/external_protocol/external_protocol_handler.cc View 4 chunks +23 lines, -16 lines 0 comments Download
M chrome/browser/platform_util.h View 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/platform_util_android.cc View 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/platform_util_chromeos.cc View 1 2 4 chunks +10 lines, -21 lines 0 comments Download
M chrome/browser/platform_util_linux.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/platform_util_mac.mm View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/platform_util_win.cc View 2 chunks +36 lines, -29 lines 0 comments Download
M chrome/browser/ui/apps/chrome_shell_window_delegate.cc View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_commands.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/external_protocol_dialog.h View 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/external_protocol_dialog.mm View 3 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/ui/external_protocol_dialog_delegate.h View 2 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/ui/external_protocol_dialog_delegate.cc View 2 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/ui/gtk/first_run_dialog.h View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/first_run_dialog.cc View 4 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/ui/gtk/protocol_dialog_gtk.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/views/external_protocol_dialog.h View 1 3 chunks +7 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/external_protocol_dialog.cc View 1 4 chunks +13 lines, -11 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
hashimoto
sky@, Could you review this change?
7 years ago (2013-12-10 14:08:56 UTC) #1
sky
https://codereview.chromium.org/107033003/diff/140001/chrome/browser/external_protocol/external_protocol_handler.cc File chrome/browser/external_protocol/external_protocol_handler.cc (right): https://codereview.chromium.org/107033003/diff/140001/chrome/browser/external_protocol/external_protocol_handler.cc#newcode297 chrome/browser/external_protocol/external_protocol_handler.cc:297: content::WebContents* web_contents = tab_util::GetWebContentsByID( Can't this code be passed ...
7 years ago (2013-12-10 17:32:10 UTC) #2
hashimoto
https://codereview.chromium.org/107033003/diff/140001/chrome/browser/external_protocol/external_protocol_handler.cc File chrome/browser/external_protocol/external_protocol_handler.cc (right): https://codereview.chromium.org/107033003/diff/140001/chrome/browser/external_protocol/external_protocol_handler.cc#newcode297 chrome/browser/external_protocol/external_protocol_handler.cc:297: content::WebContents* web_contents = tab_util::GetWebContentsByID( On 2013/12/10 17:32:11, sky wrote: ...
7 years ago (2013-12-11 08:57:50 UTC) #3
sky
LGTM https://codereview.chromium.org/107033003/diff/140001/chrome/browser/external_protocol/external_protocol_handler.cc File chrome/browser/external_protocol/external_protocol_handler.cc (right): https://codereview.chromium.org/107033003/diff/140001/chrome/browser/external_protocol/external_protocol_handler.cc#newcode297 chrome/browser/external_protocol/external_protocol_handler.cc:297: content::WebContents* web_contents = tab_util::GetWebContentsByID( On 2013/12/11 08:57:51, hashimoto ...
7 years ago (2013-12-11 15:19:24 UTC) #4
hashimoto
https://codereview.chromium.org/107033003/diff/140001/chrome/browser/platform_util_chromeos.cc File chrome/browser/platform_util_chromeos.cc (right): https://codereview.chromium.org/107033003/diff/140001/chrome/browser/platform_util_chromeos.cc#newcode55 chrome/browser/platform_util_chromeos.cc:55: if (url.is_valid()) On 2013/12/11 15:19:25, sky wrote: > Under ...
7 years ago (2013-12-12 05:55:57 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hashimoto@chromium.org/107033003/200001
7 years ago (2013-12-12 05:56:43 UTC) #6
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=234928
7 years ago (2013-12-12 12:14:21 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hashimoto@chromium.org/107033003/200001
7 years ago (2013-12-12 13:42:04 UTC) #8
sky
In that case how about changing it to a DCHECK? On Wed, Dec 11, 2013 ...
7 years ago (2013-12-12 17:14:52 UTC) #9
commit-bot: I haz the power
7 years ago (2013-12-12 17:16:17 UTC) #10
Message was sent while issue was closed.
Change committed as 240346

Powered by Google App Engine
This is Rietveld 408576698