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

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

Issue 6278007: 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 // Load the instant URL. We don't reflect the url we load in url() as 501 // Load the instant URL. We don't reflect the url we load in url() as
502 // callers expect that we're loading the URL they tell us to. 502 // callers expect that we're loading the URL they tell us to.
503 // 503 //
504 // This uses an empty string for the replacement text as the url doesn't 504 // This uses an empty string for the replacement text as the url doesn't
505 // really have the search params, but we need to use the replace 505 // really have the search params, but we need to use the replace
506 // functionality so that embeded tags (like {google:baseURL}) are escaped 506 // functionality so that embeded tags (like {google:baseURL}) are escaped
507 // correctly. 507 // correctly.
508 // TODO(sky): having to use a replaceable url is a bit of a hack here. 508 // TODO(sky): having to use a replaceable url is a bit of a hack here.
509 GURL instant_url( 509 GURL instant_url(
510 template_url->instant_url()->ReplaceSearchTerms( 510 template_url->instant_url()->ReplaceSearchTerms(
511 *template_url, std::wstring(), -1, std::wstring())); 511 *template_url, string16(), -1, string16()));
512 CommandLine* cl = CommandLine::ForCurrentProcess(); 512 CommandLine* cl = CommandLine::ForCurrentProcess();
513 if (cl->HasSwitch(switches::kInstantURL)) 513 if (cl->HasSwitch(switches::kInstantURL))
514 instant_url = GURL(cl->GetSwitchValueASCII(switches::kInstantURL)); 514 instant_url = GURL(cl->GetSwitchValueASCII(switches::kInstantURL));
515 preview_contents_->controller().LoadURL( 515 preview_contents_->controller().LoadURL(
516 instant_url, GURL(), transition_type); 516 instant_url, GURL(), transition_type);
517 preview_contents_->render_view_host()->SearchBoxChange( 517 preview_contents_->render_view_host()->SearchBoxChange(
518 user_text_, verbatim, 0, 0); 518 user_text_, verbatim, 0, 0);
519 frame_load_observer_.reset( 519 frame_load_observer_.reset(
520 new FrameLoadObserver(this, 520 new FrameLoadObserver(this,
521 preview_contents()->tab_contents(), 521 preview_contents()->tab_contents(),
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 Source<NavigationController>(&preview_contents_->controller())); 770 Source<NavigationController>(&preview_contents_->controller()));
771 #endif 771 #endif
772 772
773 registrar_.Add( 773 registrar_.Add(
774 this, 774 this,
775 NotificationType::NAV_ENTRY_COMMITTED, 775 NotificationType::NAV_ENTRY_COMMITTED,
776 Source<NavigationController>(&preview_contents_->controller())); 776 Source<NavigationController>(&preview_contents_->controller()));
777 777
778 preview_contents_->tab_contents()->ShowContents(); 778 preview_contents_->tab_contents()->ShowContents();
779 } 779 }
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