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

Side by Side Diff: chrome/browser/android/provider/chrome_browser_provider.cc

Issue 579753002: Removing onBookmarkChanged notification to application on history change and added proper history c… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ChromeBrowserProvider.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/android/provider/chrome_browser_provider.h" 5 #include "chrome/browser/android/provider/chrome_browser_provider.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <list> 8 #include <list>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 void ChromeBrowserProvider::Observe( 1606 void ChromeBrowserProvider::Observe(
1607 int type, 1607 int type,
1608 const content::NotificationSource& source, 1608 const content::NotificationSource& source,
1609 const content::NotificationDetails& details) { 1609 const content::NotificationDetails& details) {
1610 if (type == chrome::NOTIFICATION_HISTORY_URL_VISITED || 1610 if (type == chrome::NOTIFICATION_HISTORY_URL_VISITED ||
1611 type == chrome::NOTIFICATION_HISTORY_URLS_DELETED) { 1611 type == chrome::NOTIFICATION_HISTORY_URLS_DELETED) {
1612 JNIEnv* env = AttachCurrentThread(); 1612 JNIEnv* env = AttachCurrentThread();
1613 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env); 1613 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env);
1614 if (obj.is_null()) 1614 if (obj.is_null())
1615 return; 1615 return;
1616 Java_ChromeBrowserProvider_onBookmarkChanged(env, obj.obj()); 1616 Java_ChromeBrowserProvider_onHistoryChanged(env, obj.obj());
1617 } else if (type == 1617 } else if (type ==
1618 chrome::NOTIFICATION_HISTORY_KEYWORD_SEARCH_TERM_UPDATED) { 1618 chrome::NOTIFICATION_HISTORY_KEYWORD_SEARCH_TERM_UPDATED) {
1619 JNIEnv* env = AttachCurrentThread(); 1619 JNIEnv* env = AttachCurrentThread();
1620 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env); 1620 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env);
1621 if (obj.is_null()) 1621 if (obj.is_null())
1622 return; 1622 return;
1623 Java_ChromeBrowserProvider_onSearchTermChanged(env, obj.obj()); 1623 Java_ChromeBrowserProvider_onSearchTermChanged(env, obj.obj());
1624 } 1624 }
1625 } 1625 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ChromeBrowserProvider.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698