| Index: chrome/browser/search_engines/template_url.cc
|
| diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc
|
| index d91bce905c6312ca124ebcde34e96055b02b58fa..f069a8e07d8bf3f159a1c4a0017b62aa173a8f57 100644
|
| --- a/chrome/browser/search_engines/template_url.cc
|
| +++ b/chrome/browser/search_engines/template_url.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -12,6 +12,7 @@
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/google_url_tracker.h"
|
| #include "chrome/browser/search_engines/template_url_model.h"
|
| +#include "chrome/common/url_constants.h"
|
| #include "gfx/favicon_size.h"
|
| #include "net/base/escape.h"
|
|
|
| @@ -621,3 +622,12 @@ void TemplateURL::InvalidateCachedValues() const {
|
| keyword_generated_ = false;
|
| }
|
| }
|
| +
|
| +std::string TemplateURL::GetExtensionId() const {
|
| + DCHECK(IsExtensionKeyword());
|
| + return GURL(WideToUTF8(url_.url())).host();
|
| +}
|
| +
|
| +bool TemplateURL::IsExtensionKeyword() const {
|
| + return GURL(WideToUTF8(url_.url())).SchemeIs(chrome::kExtensionScheme);
|
| +}
|
|
|