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

Unified Diff: chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc

Issue 367413003: No chrome dependencies in TemplateURLFetcher and TemplateURLParser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc
diff --git a/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc b/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc
deleted file mode 100644
index 61783d1c7ffeb9e82467858575f76c261b6cd2ae..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2012 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.
-
-#include "chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h"
-
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/ui/search_engines/search_engine_tab_helper.h"
-#include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h"
-#include "components/search_engines/template_url.h"
-#include "content/public/browser/notification_source.h"
-#include "content/public/browser/notification_types.h"
-#include "content/public/browser/web_contents.h"
-
-using content::WebContents;
-
-TemplateURLFetcherUICallbacks::TemplateURLFetcherUICallbacks(
- SearchEngineTabHelper* tab_helper,
- WebContents* web_contents)
- : source_(tab_helper),
- web_contents_(web_contents) {
- registrar_.Add(this,
- content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
- content::Source<WebContents>(web_contents_));
-}
-
-TemplateURLFetcherUICallbacks::~TemplateURLFetcherUICallbacks() {
-}
-
-void TemplateURLFetcherUICallbacks::ConfirmAddSearchProvider(
- TemplateURL* template_url,
- Profile* profile) {
- scoped_ptr<TemplateURL> owned_template_url(template_url);
- if (!source_ || !source_->delegate())
- return;
-
- source_->delegate()->ConfirmAddSearchProvider(owned_template_url.release(),
- profile);
-}
-
-void TemplateURLFetcherUICallbacks::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- DCHECK(type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED);
- DCHECK(source == content::Source<WebContents>(web_contents_));
- source_ = NULL;
- web_contents_ = NULL;
-}
« no previous file with comments | « chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698