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

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 7467012: Modifying prefetch to account for multi-profile. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_about_handler.h" 5 #include "chrome/browser/browser_about_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 628 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
629 BrowserThread::PostTask( 629 BrowserThread::PostTask(
630 BrowserThread::IO, FROM_HERE, 630 BrowserThread::IO, FROM_HERE,
631 NewRunnableMethod(this, &AboutDnsHandler::StartOnIOThread)); 631 NewRunnableMethod(this, &AboutDnsHandler::StartOnIOThread));
632 } 632 }
633 633
634 void StartOnIOThread() { 634 void StartOnIOThread() {
635 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 635 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
636 636
637 std::string data; 637 std::string data;
638 chrome_browser_net::PredictorGetHtmlInfo(&data); 638 source_->profile()->PredictorGetHtmlInfo(&data);
639 639
640 BrowserThread::PostTask( 640 BrowserThread::PostTask(
641 BrowserThread::UI, FROM_HERE, 641 BrowserThread::UI, FROM_HERE,
642 NewRunnableMethod(this, &AboutDnsHandler::FinishOnUIThread, data)); 642 NewRunnableMethod(this, &AboutDnsHandler::FinishOnUIThread, data));
643 } 643 }
644 644
645 void FinishOnUIThread(const std::string& data) { 645 void FinishOnUIThread(const std::string& data) {
646 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 646 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
647 source_->FinishDataRequest(data, request_id_); 647 source_->FinishDataRequest(data, request_id_);
648 } 648 }
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 return false; 1396 return false;
1397 } 1397 }
1398 1398
1399 std::vector<std::string> ChromePaths() { 1399 std::vector<std::string> ChromePaths() {
1400 std::vector<std::string> paths; 1400 std::vector<std::string> paths;
1401 paths.reserve(arraysize(kChromePaths)); 1401 paths.reserve(arraysize(kChromePaths));
1402 for (size_t i = 0; i < arraysize(kChromePaths); i++) 1402 for (size_t i = 0; i < arraysize(kChromePaths); i++)
1403 paths.push_back(kChromePaths[i]); 1403 paths.push_back(kChromePaths[i]);
1404 return paths; 1404 return paths;
1405 } 1405 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698