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

Side by Side Diff: chrome/browser/ui/browser_commands.cc

Issue 17022004: Replace --google-base-suggest-url and --instant-url with --google-base-url. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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
« no previous file with comments | « chrome/browser/search_engines/util.cc ('k') | chrome/browser/ui/omnibox/omnibox_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/browser_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 368 }
369 369
370 void Home(Browser* browser, WindowOpenDisposition disposition) { 370 void Home(Browser* browser, WindowOpenDisposition disposition) {
371 content::RecordAction(UserMetricsAction("Home")); 371 content::RecordAction(UserMetricsAction("Home"));
372 372
373 std::string extra_headers; 373 std::string extra_headers;
374 #if defined(ENABLE_RLZ) 374 #if defined(ENABLE_RLZ)
375 // If the home page is a Google home page, add the RLZ header to the request. 375 // If the home page is a Google home page, add the RLZ header to the request.
376 PrefService* pref_service = browser->profile()->GetPrefs(); 376 PrefService* pref_service = browser->profile()->GetPrefs();
377 if (pref_service) { 377 if (pref_service) {
378 std::string home_page = pref_service->GetString(prefs::kHomePage); 378 if (google_util::IsGoogleHomePageUrl(
379 if (google_util::IsGoogleHomePageUrl(home_page)) { 379 GURL(pref_service->GetString(prefs::kHomePage)))) {
380 extra_headers = RLZTracker::GetAccessPointHttpHeader( 380 extra_headers = RLZTracker::GetAccessPointHttpHeader(
381 RLZTracker::CHROME_HOME_PAGE); 381 RLZTracker::CHROME_HOME_PAGE);
382 } 382 }
383 } 383 }
384 #endif 384 #endif
385 385
386 OpenURLParams params( 386 OpenURLParams params(
387 browser->profile()->GetHomePage(), Referrer(), disposition, 387 browser->profile()->GetHomePage(), Referrer(), disposition,
388 content::PageTransitionFromInt( 388 content::PageTransitionFromInt(
389 content::PAGE_TRANSITION_AUTO_BOOKMARK | 389 content::PAGE_TRANSITION_AUTO_BOOKMARK |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile(), 1103 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile(),
1104 browser->host_desktop_type())); 1104 browser->host_desktop_type()));
1105 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1105 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1106 1106
1107 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1107 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1108 contents->GetRenderViewHost()->SyncRendererPrefs(); 1108 contents->GetRenderViewHost()->SyncRendererPrefs();
1109 app_browser->window()->Show(); 1109 app_browser->window()->Show();
1110 } 1110 }
1111 1111
1112 } // namespace chrome 1112 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/util.cc ('k') | chrome/browser/ui/omnibox/omnibox_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698