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

Side by Side Diff: chrome/browser/instant/instant_loader.cc

Issue 6322001: Remove wstring from TemplateURL and friends.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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) 2010 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/instant/instant_loader.h" 5 #include "chrome/browser/instant/instant_loader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 // Load the instant URL. We don't reflect the url we load in url() as 497 // Load the instant URL. We don't reflect the url we load in url() as
498 // callers expect that we're loading the URL they tell us to. 498 // callers expect that we're loading the URL they tell us to.
499 // 499 //
500 // This uses an empty string for the replacement text as the url doesn't 500 // This uses an empty string for the replacement text as the url doesn't
501 // really have the search params, but we need to use the replace 501 // really have the search params, but we need to use the replace
502 // functionality so that embeded tags (like {google:baseURL}) are escaped 502 // functionality so that embeded tags (like {google:baseURL}) are escaped
503 // correctly. 503 // correctly.
504 // TODO(sky): having to use a replaceable url is a bit of a hack here. 504 // TODO(sky): having to use a replaceable url is a bit of a hack here.
505 GURL instant_url( 505 GURL instant_url(
506 template_url->instant_url()->ReplaceSearchTerms( 506 template_url->instant_url()->ReplaceSearchTerms(
507 *template_url, std::wstring(), -1, std::wstring())); 507 *template_url, string16(), -1, string16()));
508 CommandLine* cl = CommandLine::ForCurrentProcess(); 508 CommandLine* cl = CommandLine::ForCurrentProcess();
509 if (cl->HasSwitch(switches::kInstantURL)) 509 if (cl->HasSwitch(switches::kInstantURL))
510 instant_url = GURL(cl->GetSwitchValueASCII(switches::kInstantURL)); 510 instant_url = GURL(cl->GetSwitchValueASCII(switches::kInstantURL));
511 preview_contents_->controller().LoadURL( 511 preview_contents_->controller().LoadURL(
512 instant_url, GURL(), transition_type); 512 instant_url, GURL(), transition_type);
513 preview_contents_->render_view_host()->SearchBoxChange( 513 preview_contents_->render_view_host()->SearchBoxChange(
514 user_text_, verbatim, 0, 0); 514 user_text_, verbatim, 0, 0);
515 frame_load_observer_.reset( 515 frame_load_observer_.reset(
516 new FrameLoadObserver(this, 516 new FrameLoadObserver(this,
517 preview_contents()->tab_contents(), 517 preview_contents()->tab_contents(),
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 Source<NavigationController>(&preview_contents_->controller())); 766 Source<NavigationController>(&preview_contents_->controller()));
767 #endif 767 #endif
768 768
769 registrar_.Add( 769 registrar_.Add(
770 this, 770 this,
771 NotificationType::NAV_ENTRY_COMMITTED, 771 NotificationType::NAV_ENTRY_COMMITTED,
772 Source<NavigationController>(&preview_contents_->controller())); 772 Source<NavigationController>(&preview_contents_->controller()));
773 773
774 preview_contents_->tab_contents()->ShowContents(); 774 preview_contents_->tab_contents()->ShowContents();
775 } 775 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_browsertest.cc ('k') | chrome/browser/policy/configuration_policy_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698