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

Issue 8233040: SpellCheck refactoring: Moved user custom dictionary for spell check to SpellCheckProfile. (Closed)

Created:
9 years, 2 months ago by shinyak (Google)
Modified:
9 years, 1 month ago
CC:
chromium-reviews, Paweł Hajdan Jr., Hajime Morrita
Visibility:
Public.

Description

A user custom dictionary for spell check was located on SpellCheckHostImpl. This prevents us from user's having spell check dictionary per profile. This patch moves a user custom dictionary code from SpellCheckHostImpl to SpellCheckProfile. BUG=None TEST=SpellCheckProfileTest.* should cover it.

Patch Set 1 #

Total comments: 12

Patch Set 2 : Fixed #

Total comments: 6

Patch Set 3 : Mentioned lifecycle of word_list #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -118 lines) Patch
M chrome/browser/profiles/profile_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/spellchecker/spellcheck_host_impl.h View 2 chunks +0 lines, -13 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_host_impl.cc View 6 chunks +5 lines, -41 lines 1 comment Download
M chrome/browser/spellchecker/spellcheck_profile.h View 1 2 6 chunks +39 lines, -3 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_profile.cc View 1 2 chunks +86 lines, -4 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_profile_provider.h View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_profile_unittest.cc View 1 3 chunks +81 lines, -53 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
shinyak (Google)
Bono-san, could you review this?
9 years, 2 months ago (2011-10-12 01:59:43 UTC) #1
Hironori Bono
Greetings Kawanaka-san, Thank you for your refactoring. I have added some drive-by comments. Regards, Hironori ...
9 years, 2 months ago (2011-10-12 02:56:56 UTC) #2
gmorrita
Hi Shinya, Thanks you for taking this! Could you add a test that verify the ...
9 years, 2 months ago (2011-10-12 03:41:11 UTC) #3
shinyak (Google)
http://codereview.chromium.org/8233040/diff/1/chrome/browser/spellchecker/spellcheck_profile.cc File chrome/browser/spellchecker/spellcheck_profile.cc (right): http://codereview.chromium.org/8233040/diff/1/chrome/browser/spellchecker/spellcheck_profile.cc#newcode25 chrome/browser/spellchecker/spellcheck_profile.cc:25: PathService::Get(chrome::DIR_USER_DATA, &personal_file_directory); Done. I made it to use lazy ...
9 years, 2 months ago (2011-10-12 10:46:54 UTC) #4
gmorrita
Thanks for update the patch. It basically looks good. I added a few small comments. ...
9 years, 2 months ago (2011-10-12 11:03:36 UTC) #5
shinyak (Google)
> http://codereview.chromium.org/8233040/diff/5001/chrome/browser/spellchecker/spellcheck_profile_unittest.cc#newcode79 > chrome/browser/spellchecker/spellcheck_profile_unittest.cc:79: > file_thread_(BrowserThread::FILE, &message_loop_) { > I guess we need one MessageLoop ...
9 years, 2 months ago (2011-10-12 13:03:24 UTC) #6
Miranda Callahan
Thank you for this change! The profile_impl code LGTM, except for one comment. http://codereview.chromium.org/8233040/diff/5001/chrome/browser/profiles/profile_impl.cc File ...
9 years, 2 months ago (2011-10-12 14:33:04 UTC) #7
shinyak (Google)
http://codereview.chromium.org/8233040/diff/5001/chrome/browser/profiles/profile_impl.cc File chrome/browser/profiles/profile_impl.cc (right): http://codereview.chromium.org/8233040/diff/5001/chrome/browser/profiles/profile_impl.cc#newcode1762 chrome/browser/profiles/profile_impl.cc:1762: spellcheck_profile_ = new SpellCheckProfile(); On 2011/10/12 14:33:05, Miranda Callahan ...
9 years, 2 months ago (2011-10-13 07:51:22 UTC) #8
shinyak (Google)
9 years, 2 months ago (2011-10-13 07:59:48 UTC) #9
gmorrita
> In that case I got an error that each thread can have only one ...
9 years, 2 months ago (2011-10-13 08:53:49 UTC) #10
Hironori Bono
Kawanaka-san, Thank you for your update. I have added a couple of comments to clarify ...
9 years, 2 months ago (2011-10-13 09:29:59 UTC) #11
Miranda Callahan
9 years, 2 months ago (2011-10-13 14:33:12 UTC) #12
http://codereview.chromium.org/8233040/diff/5001/chrome/browser/profiles/prof...
File chrome/browser/profiles/profile_impl.cc (right):

http://codereview.chromium.org/8233040/diff/5001/chrome/browser/profiles/prof...
chrome/browser/profiles/profile_impl.cc:1762: spellcheck_profile_ = new
SpellCheckProfile();
On 2011/10/13 07:51:22, shinyak wrote:
> On 2011/10/12 14:33:05, Miranda Callahan wrote:
> > scoped_ptr still uses the .reset function.
> 
> I've changed SpellCheckProfile ref-counted object (in order to keep it alive
> until receiving save task or something like that). So I made
spellcheck_profile_
> scoped_refptr instead of scoped_ptr. scoped_refptr does not have reset()
method.

My apologies, you're right, of course -- I don't know what happened to my brain
-- I looked at the .h file several times, too. :-/

Having said that -- I agree with hbono about trying to remove scoped_refptr from
Profile -- it would be great if it were possible to avoid this change!

Powered by Google App Engine
This is Rietveld 408576698