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

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

Issue 8568039: Revert 110235 - chrome: Remove 14 exit time destructors and 2 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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_terms_data.h" 5 #include "chrome/browser/search_engines/search_terms_data.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/google/google_url_tracker.h" 10 #include "chrome/browser/google/google_url_tracker.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 std::string SearchTermsData::GoogleBaseSuggestURLValue() const { 28 std::string SearchTermsData::GoogleBaseSuggestURLValue() const {
29 // Start with the Google base URL. 29 // Start with the Google base URL.
30 const GURL base_url(GoogleBaseURLValue()); 30 const GURL base_url(GoogleBaseURLValue());
31 DCHECK(base_url.is_valid()); 31 DCHECK(base_url.is_valid());
32 32
33 GURL::Replacements repl; 33 GURL::Replacements repl;
34 34
35 // Replace any existing path with "/complete/". 35 // Replace any existing path with "/complete/".
36 repl.SetPathStr("/complete/"); 36 static const std::string suggest_path("/complete/");
37 repl.SetPathStr(suggest_path);
37 38
38 // Clear the query and ref. 39 // Clear the query and ref.
39 repl.ClearQuery(); 40 repl.ClearQuery();
40 repl.ClearRef(); 41 repl.ClearRef();
41 return base_url.ReplaceComponents(repl).spec(); 42 return base_url.ReplaceComponents(repl).spec();
42 } 43 }
43 44
44 std::string SearchTermsData::InstantFieldTrialUrlParam() const { 45 std::string SearchTermsData::InstantFieldTrialUrlParam() const {
45 return std::string(); 46 return std::string();
46 } 47 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) || 92 DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) ||
92 BrowserThread::CurrentlyOn(BrowserThread::UI)); 93 BrowserThread::CurrentlyOn(BrowserThread::UI));
93 return InstantFieldTrial::GetGroupAsUrlParam(profile_); 94 return InstantFieldTrial::GetGroupAsUrlParam(profile_);
94 } 95 }
95 96
96 // static 97 // static
97 void UIThreadSearchTermsData::SetGoogleBaseURL(std::string* google_base_url) { 98 void UIThreadSearchTermsData::SetGoogleBaseURL(std::string* google_base_url) {
98 delete google_base_url_; 99 delete google_base_url_;
99 google_base_url_ = google_base_url; 100 google_base_url_ = google_base_url;
100 } 101 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc ('k') | chrome/browser/ui/gtk/about_chrome_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698