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

Unified Diff: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h

Issue 1288903002: Refactor ShortcutHelper and merge in BookmarkUtils (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test file name Created 5 years, 4 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
Index: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
diff --git a/chrome/browser/android/shortcut_data_fetcher.h b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
similarity index 86%
rename from chrome/browser/android/shortcut_data_fetcher.h
rename to chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
index f1e8593786ac521b81878c42203740ae0e3fa3db..d3af3ac1c0f8b7198f3d36d439046c2de4646e38 100644
--- a/chrome/browser/android/shortcut_data_fetcher.h
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_ANDROID_SHORTCUT_DATA_FETCHER_H_
-#define CHROME_BROWSER_ANDROID_SHORTCUT_DATA_FETCHER_H_
+#ifndef CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_
+#define CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_
#include "base/basictypes.h"
#include "base/task/cancelable_task_tracker.h"
@@ -31,8 +31,8 @@ class GURL;
// refcounted to prevent the class from being prematurely deleted. If the
// pointer to the ShortcutHelper becomes invalid, the pipeline should kill
// itself.
-class ShortcutDataFetcher
- : public base::RefCounted<ShortcutDataFetcher>,
+class AddToHomescreenDataFetcher
+ : public base::RefCounted<AddToHomescreenDataFetcher>,
public content::WebContentsObserver {
public:
class Observer {
@@ -52,7 +52,8 @@ class ShortcutDataFetcher
// Initialize the fetcher by requesting the information about the page to the
// renderer process. The initialization is asynchronous and
// OnDidGetWebApplicationInfo is expected to be called when finished.
- ShortcutDataFetcher(content::WebContents* web_contents, Observer* observer);
+ AddToHomescreenDataFetcher(content::WebContents* web_contents,
+ Observer* observer);
// IPC message received when the initialization is finished.
void OnDidGetWebApplicationInfo(const WebApplicationInfo& web_app_info);
@@ -70,7 +71,7 @@ class ShortcutDataFetcher
bool OnMessageReceived(const IPC::Message& message) override;
private:
- ~ShortcutDataFetcher() override;
+ ~AddToHomescreenDataFetcher() override;
// Grabs the favicon for the current URL.
void FetchFavicon();
@@ -107,8 +108,8 @@ class ShortcutDataFetcher
const int preferred_icon_size_in_px_;
static const int kPreferredIconSizeInDp;
- friend class base::RefCounted<ShortcutDataFetcher>;
- DISALLOW_COPY_AND_ASSIGN(ShortcutDataFetcher);
+ friend class base::RefCounted<AddToHomescreenDataFetcher>;
+ DISALLOW_COPY_AND_ASSIGN(AddToHomescreenDataFetcher);
};
-#endif // CHROME_BROWSER_ANDROID_SHORTCUT_DATA_FETCHER_H_
+#endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_
« no previous file with comments | « chrome/browser/android/shortcut_helper.cc ('k') | chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698