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

Side by Side Diff: chrome/browser/spellchecker/spellcheck_host_impl.cc

Issue 9764011: Stopped sending cookie for downloading spellcheck dictionaries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/spellchecker/spellcheck_host_impl.h" 5 #include "chrome/browser/spellchecker/spellcheck_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 std::string bdict_file = bdict_file_path_.BaseName().MaybeAsASCII(); 278 std::string bdict_file = bdict_file_path_.BaseName().MaybeAsASCII();
279 if (bdict_file.empty()) { 279 if (bdict_file.empty()) {
280 NOTREACHED(); 280 NOTREACHED();
281 return; 281 return;
282 } 282 }
283 GURL url = GURL(std::string(kDownloadServerUrl) + 283 GURL url = GURL(std::string(kDownloadServerUrl) +
284 StringToLowerASCII(bdict_file)); 284 StringToLowerASCII(bdict_file));
285 fetcher_.reset(content::URLFetcher::Create(url, content::URLFetcher::GET, 285 fetcher_.reset(content::URLFetcher::Create(url, content::URLFetcher::GET,
286 weak_ptr_factory_.GetWeakPtr())); 286 weak_ptr_factory_.GetWeakPtr()));
287 fetcher_->SetRequestContext(request_context_getter_); 287 fetcher_->SetRequestContext(request_context_getter_);
288 fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES); 288 fetcher_->SetLoadFlags(
289 net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES);
289 tried_to_download_ = true; 290 tried_to_download_ = true;
290 fetcher_->Start(); 291 fetcher_->Start();
291 request_context_getter_ = NULL; 292 request_context_getter_ = NULL;
292 } 293 }
293 294
294 void SpellCheckHostImpl::LoadCustomDictionary(CustomWordList* custom_words) { 295 void SpellCheckHostImpl::LoadCustomDictionary(CustomWordList* custom_words) {
295 if (!custom_words) 296 if (!custom_words)
296 return; 297 return;
297 298
298 // Load custom dictionary for profile. 299 // Load custom dictionary for profile.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 450
450 void SpellCheckHostImpl::AddWordComplete(const std::string& word) { 451 void SpellCheckHostImpl::AddWordComplete(const std::string& word) {
451 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 452 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
452 453
453 for (content::RenderProcessHost::iterator i( 454 for (content::RenderProcessHost::iterator i(
454 content::RenderProcessHost::AllHostsIterator()); 455 content::RenderProcessHost::AllHostsIterator());
455 !i.IsAtEnd(); i.Advance()) { 456 !i.IsAtEnd(); i.Advance()) {
456 i.GetCurrentValue()->Send(new SpellCheckMsg_WordAdded(word)); 457 i.GetCurrentValue()->Send(new SpellCheckMsg_WordAdded(word));
457 } 458 }
458 } 459 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698