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

Issue 11785018: drive: Add Profile* as a member of DriveProtocolHandler. (Closed)

Created:
7 years, 11 months ago by Haruki Sato
Modified:
7 years, 11 months ago
Reviewers:
DaveMoore, hashimoto
CC:
chromium-reviews, achuith+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

drive: Add Profile* as a member of DriveProtocolHandler. A Profile* can be passed to the constructor of DriveProtocolHandler and the handler uses the given Profile* for processing the request. This will help us adding unittests and introducting support for multiple profiles. If the handler is constructed without Profile*, it will use the profile from ProfileManager::GetDefaultProfile(). BUG=167249 TEST=unittests. try opening a URL of 'drive://' (e.g. HTML file stored in Google Drive) on Chrome OS. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=176062

Patch Set 1 #

Total comments: 4

Patch Set 2 : Replace the initialization in profile_io_data. Use forward declaration instead of direct include. #

Total comments: 2

Patch Set 3 : Use reinterpret_case. #

Total comments: 4

Patch Set 4 : partly addressed the comments. #

Patch Set 5 : Add IsValidProfile check in DriveProtocolHandler. #

Total comments: 4

Patch Set 6 : Add/Restore necessary #include-s. #

Patch Set 7 : Move IsValidCheck to GetSystemService to remove duplication. #

Total comments: 2

Patch Set 8 : Add availability check before initializing DriveProtocolHandler #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -15 lines) Patch
M chrome/browser/chromeos/drive/drive_protocol_handler.h View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/drive/drive_protocol_handler.cc View 1 2 3 4 5 6 9 chunks +25 lines, -12 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Haruki Sato
I'd like to start from adding a Profile* member. This CL keeps the initialization in ...
7 years, 11 months ago (2013-01-07 04:59:58 UTC) #1
hashimoto
https://codereview.chromium.org/11785018/diff/1/chrome/browser/chromeos/drive/drive_protocol_handler.cc File chrome/browser/chromeos/drive/drive_protocol_handler.cc (right): https://codereview.chromium.org/11785018/diff/1/chrome/browser/chromeos/drive/drive_protocol_handler.cc#newcode919 chrome/browser/chromeos/drive/drive_protocol_handler.cc:919: DriveProtocolHandler::DriveProtocolHandler() How about initializing DriveProtocolHandler with Profile* and stop ...
7 years, 11 months ago (2013-01-07 05:18:45 UTC) #2
Haruki Sato
Thank you for the review. I'm not 100% sure if we can pass the Profile* ...
7 years, 11 months ago (2013-01-07 06:24:42 UTC) #3
hashimoto
https://codereview.chromium.org/11785018/diff/9002/chrome/browser/chromeos/drive/drive_protocol_handler.cc File chrome/browser/chromeos/drive/drive_protocol_handler.cc (right): https://codereview.chromium.org/11785018/diff/9002/chrome/browser/chromeos/drive/drive_protocol_handler.cc#newcode96 chrome/browser/chromeos/drive/drive_protocol_handler.cc:96: profile ? profile : ProfileManager::GetDefaultProfile()); It looks like now ...
7 years, 11 months ago (2013-01-07 06:32:32 UTC) #4
Haruki Sato
https://codereview.chromium.org/11785018/diff/3004/chrome/browser/chromeos/drive/drive_protocol_handler.h File chrome/browser/chromeos/drive/drive_protocol_handler.h (right): https://codereview.chromium.org/11785018/diff/3004/chrome/browser/chromeos/drive/drive_protocol_handler.h#newcode23 chrome/browser/chromeos/drive/drive_protocol_handler.h:23: // If |profile_| is NULL, the profile from ProfileManager::GetDefaultProfile() ...
7 years, 11 months ago (2013-01-07 08:15:47 UTC) #5
hashimoto
lgtm https://codereview.chromium.org/11785018/diff/1007/chrome/browser/chromeos/drive/drive_protocol_handler.cc File chrome/browser/chromeos/drive/drive_protocol_handler.cc (right): https://codereview.chromium.org/11785018/diff/1007/chrome/browser/chromeos/drive/drive_protocol_handler.cc#newcode93 chrome/browser/chromeos/drive/drive_protocol_handler.cc:93: DriveSystemService* GetSystemService(Profile* profile) { How about moving the ...
7 years, 11 months ago (2013-01-07 08:22:51 UTC) #6
Haruki Sato
David, Could you take a look as an OWNER of chrome/browser/profiles ? Thanks. https://codereview.chromium.org/11785018/diff/1007/chrome/browser/chromeos/drive/drive_protocol_handler.cc File ...
7 years, 11 months ago (2013-01-07 08:54:48 UTC) #7
Haruki Sato
ping? @davemoore Could you help me on this? Thanks.
7 years, 11 months ago (2013-01-08 10:32:24 UTC) #8
DaveMoore
https://codereview.chromium.org/11785018/diff/17001/chrome/browser/chromeos/drive/drive_protocol_handler.h File chrome/browser/chromeos/drive/drive_protocol_handler.h (right): https://codereview.chromium.org/11785018/diff/17001/chrome/browser/chromeos/drive/drive_protocol_handler.h#newcode14 chrome/browser/chromeos/drive/drive_protocol_handler.h:14: explicit DriveProtocolHandler(void* profile_id); Why would we take a void* ...
7 years, 11 months ago (2013-01-08 19:07:59 UTC) #9
Haruki Sato
https://codereview.chromium.org/11785018/diff/17001/chrome/browser/chromeos/drive/drive_protocol_handler.h File chrome/browser/chromeos/drive/drive_protocol_handler.h (right): https://codereview.chromium.org/11785018/diff/17001/chrome/browser/chromeos/drive/drive_protocol_handler.h#newcode14 chrome/browser/chromeos/drive/drive_protocol_handler.h:14: explicit DriveProtocolHandler(void* profile_id); On 2013/01/08 19:07:59, DaveMoore wrote: > ...
7 years, 11 months ago (2013-01-08 23:08:27 UTC) #10
DaveMoore
lgtm
7 years, 11 months ago (2013-01-09 17:56:18 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haruki@chromium.org/11785018/17001
7 years, 11 months ago (2013-01-10 00:15:49 UTC) #12
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) interactive_ui_tests
7 years, 11 months ago (2013-01-10 01:17:50 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haruki@chromium.org/11785018/17001
7 years, 11 months ago (2013-01-10 01:41:39 UTC) #14
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) interactive_ui_tests
7 years, 11 months ago (2013-01-10 02:42:00 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haruki@chromium.org/11785018/29001
7 years, 11 months ago (2013-01-10 07:00:18 UTC) #16
commit-bot: I haz the power
7 years, 11 months ago (2013-01-10 14:07:21 UTC) #17
Message was sent while issue was closed.
Change committed as 176062

Powered by Google App Engine
This is Rietveld 408576698