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

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

Issue 6733043: Coverity: Pass parameters by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
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"
(...skipping 12 matching lines...) Expand all
23 #include "content/common/notification_source.h" 23 #include "content/common/notification_source.h"
24 #include "content/common/notification_type.h" 24 #include "content/common/notification_type.h"
25 25
26 typedef SearchHostToURLsMap::TemplateURLSet TemplateURLSet; 26 typedef SearchHostToURLsMap::TemplateURLSet TemplateURLSet;
27 27
28 namespace { 28 namespace {
29 29
30 // Implementation of SearchTermsData that may be used on the I/O thread. 30 // Implementation of SearchTermsData that may be used on the I/O thread.
31 class IOThreadSearchTermsData : public SearchTermsData { 31 class IOThreadSearchTermsData : public SearchTermsData {
32 public: 32 public:
33 explicit IOThreadSearchTermsData(std::string google_base_url); 33 explicit IOThreadSearchTermsData(const std::string& google_base_url);
34 34
35 // Implementation of SearchTermsData. 35 // Implementation of SearchTermsData.
36 virtual std::string GoogleBaseURLValue() const; 36 virtual std::string GoogleBaseURLValue() const;
37 virtual std::string GetApplicationLocale() const; 37 virtual std::string GetApplicationLocale() const;
38 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) 38 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
39 virtual string16 GetRlzParameterValue() const { 39 virtual string16 GetRlzParameterValue() const {
40 // This value doesn't matter for our purposes. 40 // This value doesn't matter for our purposes.
41 return string16(); 41 return string16();
42 } 42 }
43 #endif 43 #endif
44 44
45 private: 45 private:
46 std::string google_base_url_; 46 std::string google_base_url_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(IOThreadSearchTermsData); 48 DISALLOW_COPY_AND_ASSIGN(IOThreadSearchTermsData);
49 }; 49 };
50 50
51 IOThreadSearchTermsData::IOThreadSearchTermsData(std::string google_base_url) 51 IOThreadSearchTermsData::IOThreadSearchTermsData(
52 : google_base_url_(google_base_url) { 52 const std::string& google_base_url) : google_base_url_(google_base_url) {
53 } 53 }
54 54
55 std::string IOThreadSearchTermsData::GoogleBaseURLValue() const { 55 std::string IOThreadSearchTermsData::GoogleBaseURLValue() const {
56 return google_base_url_; 56 return google_base_url_;
57 } 57 }
58 58
59 std::string IOThreadSearchTermsData::GetApplicationLocale() const { 59 std::string IOThreadSearchTermsData::GetApplicationLocale() const {
60 // This value doesn't matter for our purposes. 60 // This value doesn't matter for our purposes.
61 return "yy"; 61 return "yy";
62 } 62 }
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 void SearchProviderInstallData::NotifyLoaded() { 298 void SearchProviderInstallData::NotifyLoaded() {
299 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 299 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
300 300
301 task_queue_.Run(); 301 task_queue_.Run();
302 302
303 // Since we expect this request to be rare, clear out the information. This 303 // Since we expect this request to be rare, clear out the information. This
304 // also keeps the responses current as the search providers change. 304 // also keeps the responses current as the search providers change.
305 provider_map_.reset(); 305 provider_map_.reset();
306 SetDefault(NULL); 306 SetDefault(NULL);
307 } 307 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tts_api.cc ('k') | chrome/browser/sync/profile_sync_service_harness.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698