| OLD | NEW |
| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 using base::android::ConvertJavaStringToUTF16; | 51 using base::android::ConvertJavaStringToUTF16; |
| 52 using base::android::ConvertJavaStringToUTF8; | 52 using base::android::ConvertJavaStringToUTF8; |
| 53 using base::android::ConvertUTF8ToJavaString; | 53 using base::android::ConvertUTF8ToJavaString; |
| 54 using base::android::ConvertUTF16ToJavaString; | 54 using base::android::ConvertUTF16ToJavaString; |
| 55 using base::android::GetClass; | 55 using base::android::GetClass; |
| 56 using base::android::MethodID; | 56 using base::android::MethodID; |
| 57 using base::android::JavaRef; | 57 using base::android::JavaRef; |
| 58 using base::android::ScopedJavaGlobalRef; | 58 using base::android::ScopedJavaGlobalRef; |
| 59 using base::android::ScopedJavaLocalRef; | 59 using base::android::ScopedJavaLocalRef; |
| 60 using bookmarks::BookmarkModel; | 60 using bookmarks::BookmarkModel; |
| 61 using bookmarks::BookmarkNode; |
| 61 using content::BrowserThread; | 62 using content::BrowserThread; |
| 62 | 63 |
| 63 // After refactoring the following class hierarchy has been created in order | 64 // After refactoring the following class hierarchy has been created in order |
| 64 // to avoid repeating code again for the same basic kind of tasks, to enforce | 65 // to avoid repeating code again for the same basic kind of tasks, to enforce |
| 65 // the correct thread usage and to prevent known race conditions and deadlocks. | 66 // the correct thread usage and to prevent known race conditions and deadlocks. |
| 66 // | 67 // |
| 67 // - RunOnUIThreadBlocking: auxiliary class to run methods in the UI thread | 68 // - RunOnUIThreadBlocking: auxiliary class to run methods in the UI thread |
| 68 // blocking the current one until finished. Because of the provider threading | 69 // blocking the current one until finished. Because of the provider threading |
| 69 // expectations this cannot be used from the UI thread. | 70 // expectations this cannot be used from the UI thread. |
| 70 // | 71 // |
| (...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1639 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env); | 1640 ScopedJavaLocalRef<jobject> obj = weak_java_provider_.get(env); |
| 1640 if (obj.is_null()) | 1641 if (obj.is_null()) |
| 1641 return; | 1642 return; |
| 1642 Java_ChromeBrowserProvider_onSearchTermChanged(env, obj.obj()); | 1643 Java_ChromeBrowserProvider_onSearchTermChanged(env, obj.obj()); |
| 1643 } | 1644 } |
| 1644 | 1645 |
| 1645 void ChromeBrowserProvider::OnKeywordSearchTermDeleted( | 1646 void ChromeBrowserProvider::OnKeywordSearchTermDeleted( |
| 1646 HistoryService* history_service, | 1647 HistoryService* history_service, |
| 1647 history::URLID url_id) { | 1648 history::URLID url_id) { |
| 1648 } | 1649 } |
| OLD | NEW |