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

Side by Side Diff: chrome/browser/search_engines/search_provider_install_data.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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/search_engines/search_provider_install_data.h" 5 #include "chrome/browser/search_engines/search_provider_install_data.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/task.h" 12 #include "base/task.h"
13 #include "chrome/browser/search_engines/search_host_to_urls_map.h" 13 #include "chrome/browser/search_engines/search_host_to_urls_map.h"
14 #include "chrome/browser/search_engines/search_terms_data.h" 14 #include "chrome/browser/search_engines/search_terms_data.h"
15 #include "chrome/browser/search_engines/template_url.h" 15 #include "chrome/browser/search_engines/template_url.h"
16 #include "chrome/browser/search_engines/template_url_service.h" 16 #include "chrome/browser/search_engines/template_url_service.h"
17 #include "chrome/browser/search_engines/util.h" 17 #include "chrome/browser/search_engines/util.h"
18 #include "chrome/browser/webdata/web_data_service.h" 18 #include "chrome/browser/webdata/web_data_service.h"
19 #include "chrome/common/chrome_notification_types.h" 19 #include "chrome/common/chrome_notification_types.h"
20 #include "content/public/browser/browser_thread.h" 20 #include "content/public/browser/browser_thread.h"
21 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
22 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
23 #include "content/public/browser/notification_service.h" 23 #include "content/public/browser/notification_service.h"
24 #include "content/public/browser/notification_source.h" 24 #include "content/public/browser/notification_source.h"
25 25
26 using content::BrowserThread;
27
26 typedef SearchHostToURLsMap::TemplateURLSet TemplateURLSet; 28 typedef SearchHostToURLsMap::TemplateURLSet TemplateURLSet;
27 29
28 namespace { 30 namespace {
29 31
30 // Implementation of SearchTermsData that may be used on the I/O thread. 32 // Implementation of SearchTermsData that may be used on the I/O thread.
31 class IOThreadSearchTermsData : public SearchTermsData { 33 class IOThreadSearchTermsData : public SearchTermsData {
32 public: 34 public:
33 explicit IOThreadSearchTermsData(const std::string& google_base_url); 35 explicit IOThreadSearchTermsData(const std::string& google_base_url);
34 36
35 // Implementation of SearchTermsData. 37 // Implementation of SearchTermsData.
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 void SearchProviderInstallData::NotifyLoaded() { 300 void SearchProviderInstallData::NotifyLoaded() {
299 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 301 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
300 302
301 task_queue_.Run(); 303 task_queue_.Run();
302 304
303 // Since we expect this request to be rare, clear out the information. This 305 // Since we expect this request to be rare, clear out the information. This
304 // also keeps the responses current as the search providers change. 306 // also keeps the responses current as the search providers change.
305 provider_map_.reset(); 307 provider_map_.reset();
306 SetDefault(NULL); 308 SetDefault(NULL);
307 } 309 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698